flutter_state_builder 1.0.0 copy "flutter_state_builder: ^1.0.0" to clipboard
flutter_state_builder: ^1.0.0 copied to clipboard

outdated

A state builder.

A state builder.

Features #

A convenience widget to rebuild child widget without using Stateful Widget.

[builder] => return the child widget, which needs to refreshed

[routeName] => String value for id of parent widget.

[holder] => a specific String id for a StateBuilder widget. If you have more than one builder in a parent widget and you just wanna refresh one of them, set holder id for it.

This widget always goes with a StateHandler instance as a couple. StateBuilder just like a widget wrapper and StateHandler will control how and when we need to rebuild the child widget. It means you have to declare a StateHandler has same [routeName] with StateBuilder.

Getting started #

TODO: List prerequisites and provide or point to information on how to start using the package.

Usage #

StateHandler _handler = StateHandler('your_screen_widget_route_name');
StateBuilder(
    routeName: 'your_screen_widget_route_name',
    builder: () => child_widget,
    holder: 'a_builder_id',
)
  • [StateHandler], which controls the state of a StateBuilder. When you need to rebuild the builder, call this function
_handler.refresh();

Additional information #

Email: leonacky@gmail.com

2
likes
0
points
34
downloads

Publisher

unverified uploader

Weekly Downloads

A state builder.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on flutter_state_builder