ProgressBarModel class final

A UV-safe progress bar model that can be hosted inside a parent Model.

This model does not write to the terminal. It only renders via view().

Drive it using:

Inheritance

Constructors

ProgressBarModel({int? id, int current = 0, int total = 0, int width = 40, String fillChar = '=', String emptyChar = ' ', bool showPercentage = true, bool showCount = true, RenderConfig renderConfig = const RenderConfig()})

Properties

current int
final
emptyChar String
final
fillChar String
final
hashCode int
The hash code for this object.
no setterinherited
id int
final
renderConfig RenderConfig
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showCount bool
final
showPercentage bool
final
total int
final
width int
final

Methods

copyWith({int? current, int? total, int? width, String? fillChar, String? emptyChar, bool? showPercentage, bool? showCount, RenderConfig? renderConfig}) ProgressBarModel
init() Cmd?
Returns an optional command to execute on program startup.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
update(Msg msg) → (ViewComponent, Cmd?)
Updates the component state in response to a message.
override
view() String
Renders the current model state for display.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited