ProgressBarComponent class TUI
A progress bar component.
For static rendering (shows current state):
print(ProgressBarComponent(current: 50, total: 100).render());
In addition to interactive models, Artisanal provides DisplayComponents.
These are simple string renderers that don't handle input but provide
consistent styling for tables, lists, and panels.
Use RenderConfig to adapt these components to the current terminal
width and color capabilities.
- Inheritance
-
- Object
- Model
- ViewComponent
- StaticComponent
- DisplayComponent
- ProgressBarComponent
- Available extensions
Constructors
- ProgressBarComponent({required int current, required int total, int width = 40, String fillChar = '=', String emptyChar = ' ', bool showPercentage = true, bool showCount = true, RenderConfig renderConfig = const RenderConfig()})
-
const
Properties
- current → int
-
final
- emptyChar → String
-
final
- fillChar → String
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- lineCount → int
-
Number of lines in render.
no setterinherited
- 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
-
init(
) → Cmd? -
Returns an optional command to execute on program startup.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
render(
) → String -
Renders the component as a string.
override
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
Msg msg) → (ViewComponent, Cmd?) -
Updates the component state in response to a message.
inherited
-
view(
) → String -
Renders the current model state for display.
inherited
-
writelnTo(
Console io) → void -
Available on DisplayComponent, provided by the DisplayComponentExtension extension
Renders the component and writes it to the console.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited