Loader<T> constructor
Loader<T> ({
- required FutureOr<
T?> load(), - StatefulServiceCache<
T?> ? cache, - bool verboseLogging = false,
- bool autoInitialize = false,
Implementation
Loader({required FutureOr<T?> Function() load, super.cache, super.verboseLogging, bool autoInitialize = false})
: _load = load,
super(initialState: autoInitialize && load is T? Function() ? load() : null) {
if (autoInitialize && load is Future<T?> Function()) {
initialize();
}
}