BLoCProvider<T extends BLoC> constructor

const BLoCProvider<T extends BLoC>({
  1. Key? key,
  2. required Widget child,
  3. required T bloc,
  4. ValueChanged<T>? init,
  5. VoidCallback? onDispose,
  6. @Deprecated('使用canDispose代替, 灵活性更好') bool autoDispose = true,
  7. 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,
});