StateBuilder<T> constructor
const
StateBuilder<T> ({
- Key? key,
- Widget builder(
- BuildContext context,
- ReactiveModel<
T> ? model
- ReactiveModel<
T> observe()?, - List<
ReactiveModel Function()> ? observeMany, - Widget builderWithChild(
- BuildContext context,
- ReactiveModel<
T> ? model, - Widget child
- Widget? child,
- dynamic onSetState(
- BuildContext context,
- ReactiveModel<
T> ? model
- void onRebuildState(
- BuildContext context,
- ReactiveModel<
T> ? model
- Object? watch(
- SnapState<
T> ? model
- SnapState<
- bool shouldRebuild(
- SnapState<
T> ? model
- SnapState<
- void initState(
- BuildContext context,
- ReactiveModel<
T> ? model
- void dispose(
- BuildContext context,
- ReactiveModel<
T> ? model
- void didChangeDependencies(
- BuildContext context,
- ReactiveModel<
T> ? model
- void didUpdateWidget(
- BuildContext context,
- ReactiveModel<
T> ? model, - StateBuilder<
T> oldWidget
- void afterInitialBuild(
- BuildContext context,
- ReactiveModel<
T> ? model
One of the three observer widgets in states_rebuilder
See: WhenRebuilder
, WhenRebuilderOr
Implementation
const StateBuilder({
Key? key,
// For state management
this.builder,
this.observe,
this.observeMany,
// this.tag,
this.builderWithChild,
this.child,
this.onSetState,
this.onRebuildState,
this.watch,
this.shouldRebuild,
// For state lifecycle
this.initState,
this.dispose,
this.didChangeDependencies,
this.didUpdateWidget,
this.afterInitialBuild,
}) : assert(builder != null || builderWithChild != null, '''
| ***Builder not defined***
| You have to define either 'builder' or 'builderWithChild' parameter.
| Use 'builderWithChild' with 'child' parameter.
| If 'child' is null use 'builder' instead.
'''),
assert(builderWithChild == null || child != null, '''
| ***child is null***
| You have defined the 'builderWithChild' parameter without defining the child parameter.
| Use 'builderWithChild' with 'child' parameter.
| If 'child' is null use 'builder' instead.
'''),
super(key: key);