Provider<T> typedef

Provider<T> = FutureOr<T> Function(ModuleRef ref)

Module provider.

A provider is a function that returns a value.

final Provider<String> hello = (ref) => 'Hello World!';
final module = Module(
  providers: { hello },
);

Implementation

typedef Provider<T> = FutureOr<T> Function(ModuleRef ref);