FlutterBloc Classes - 2.1.1
2020-09-30 14:29:17 0 举报
bloc笔记
作者其他创作
大纲/内容
send state
Widget
typedef ValueBuilder<T> = T Function(BuildContext context);
add business logic offscreen
Event
InheritedWidget
- InheritedElement createElement()- bool updateShouldNotify(covariant InheritedWidget oldWidget)
Provider<T>
...
Disposer<T>
BlocProvidersMutiBlocProviders
ValueDelegateWidget
SingleValueDelegate<T>
- SingleValueDelegate(this.value);- T get value;
BlocBuilder
StatelessWidget
ValueBuilder<T>
T Function(BuildContext context)
UI
BuilderStateDelegate<T>
- initDelegate();- didUpdateDelegate(BuilderStateDelegate<T> old)- dispose()
SingleChildCloneableWidget
- SingleChildCloneableWidget cloneWithChild(Widget child);
SingleChildCloneableWidget
BlocProvider<T>
ui events
State
provider bloc
MultiProvider
DelegateWidget
StateDelegate
- StateDelegate- BuildContext _context;- StateSetter get setState- initDelegate- didUpdateDelegate(covariant StateDelegate old)- dispose()
servicelogicbluetoothlocationsocketsourceTimer...
BlocListener
HydrateBloc
_BlocBuilderBaseState
- StreamSubscription<S> _subscription;- S _previousState;- S _state;- B _bloc;
BlocBuilder
State<DelegateWidget>
- T get widget;- BuildContext get context => _element- bool get mounted- initState()- didUpdateWidget(covariant T oldWidget)- reassemble()- setState(VoidCallback fn)- deactivate()- dispose()- Widget build(BuildContext context)
_DelegateWidgetState
- _initDelegate()- _mountDelegate()- _unmountDelegate(StateDelegate delegate)- didUpdateWidget(DelegateWidget oldWidget)- Widget build(BuildContext context)- dispose
InheritedProvider<T>
Bloc
ValueStateDelegate<T>
- T get value;
filter state
Repositories
add evnet
_DelegateElement
StatefulWidget
- StatefulElement createElement()- State createState()
ValueDelegateWidget
InheritedElement
mapEventToState
0 条评论
下一页