BlocProvider<T extends Bloc<S>, S extends BlocState> constructor

BlocProvider<T extends Bloc<S>, S extends BlocState>({
  1. required T bloc,
  2. Dispose<T>? dispose,
  3. Widget? child,
  4. Key? key,
})

Implementation

BlocProvider({
  required T bloc,
  Dispose<T>? dispose,
  Widget? child,
  Key? key,
}) : this._(
        create: (_) => bloc,
        dispose: dispose,
        child: child,
        key: key,
      );