KinoProgressBar
Mix.install([
{:kino_progress_bar, "~> 0.1"}
])
Progress bar
progress_bar = KinoProgressBar.new("PROGRESS")
KinoProgressBar.set_current(progress_bar, 20)
red_bar = KinoProgressBar.new(
"Red",
color: :red,
width: 800,
range: {0, 1000},
current: 500,
format_current: fn index -> "#{index} 回" end,
throttle: 100
)
0..1000
|> Enum.each(fn index ->
Process.sleep(2)
KinoProgressBar.set_current(red_bar, index)
end)