BlocProvider<T extends Bloc>.fromBuilder constructor
BlocProvider<T extends Bloc>.fromBuilder ({
- required BlocBuilder<
T> builder, - required Widget child,
builder
is used to create the bloc to be provided.
Implementation
factory BlocProvider.fromBuilder({
required BlocBuilder<T> builder,
required Widget child,
}) =>
BlocProvider(
create: (context, channel) =>
builder.builder(context.asReadable(), channel),
child: child,
);