OnBuilder<T>.bindingObserver constructor
OnBuilder<T>.bindingObserver ({
- Key? key,
- IObservable<
T> ? listenTo, - required Widget builder(),
- SideEffects<
T> ? sideEffects, - ShouldRebuild? shouldRebuild,
- void didChangeAppLifecycleState(
- BuildContext context,
- AppLifecycleState state
- void didChangeLocales(
- BuildContext context,
- List<
Locale> ? locale
Create a widget that registers with the Widgets layer binding. Used to track the app life cycle (AppLifecycleState).
Implementation
factory OnBuilder.bindingObserver({
Key? key,
IObservable<T>? listenTo,
required Widget Function() builder,
// this.listenToMany,
SideEffects<T>? sideEffects,
ShouldRebuild? shouldRebuild,
// this.watch,
// this.debugPrintWhenRebuild,
void Function(BuildContext context, AppLifecycleState state)?
didChangeAppLifecycleState,
void Function(BuildContext context, List<Locale>? locale)? didChangeLocales,
}) {
return OnBuilderBindingObserver<T>(
listenTo: listenTo,
builder: builder,
sideEffects: sideEffects,
shouldRebuild: shouldRebuild,
didChangeAppLifecycleState: didChangeAppLifecycleState,
didChangeLocales: didChangeLocales,
);
}