RepositoryProvider<T extends Repository>.fromBuilder constructor
RepositoryProvider<T extends Repository>.fromBuilder ({
- required RepositoryBuilder<
T> builder, - required Widget child,
builder
shows how the repository will be instantiated.
Implementation
factory RepositoryProvider.fromBuilder({
required RepositoryBuilder<T> builder,
required Widget child,
}) =>
RepositoryProvider(
create: (context) => builder.builder(context.asReadable()),
child: child,
);