BLoCProvider<T extends BLoC> constructor
const
BLoCProvider<T extends BLoC> ({
- Key? key,
- required Widget child,
- required T bloc,
- ValueChanged<
T> ? init, - VoidCallback? onDispose,
- @Deprecated('使用canDispose代替, 灵活性更好') bool autoDispose = true,
- bool canDispose() = returnTrue,
Implementation
const BLoCProvider({
super.key,
required this.child,
required this.bloc,
this.init,
this.onDispose,
@Deprecated('使用canDispose代替, 灵活性更好') this.autoDispose = true,
this.canDispose = returnTrue,
});