DataDelegate<V> constructor
DataDelegate<V> ({
- required _FromNetwork<
V> fromNetwork, - _FromMemory<
V> ? fromMemory, - _ToMemory<
V> ? toMemory, - _FromStorage<
V> ? fromStorage, - _ToStorage<
V> ? toStorage, - _ClearCache? onClearCache,
Implementation
DataDelegate({
required this.fromNetwork,
this.fromMemory,
this.toMemory,
this.fromStorage,
this.toStorage,
this.onClearCache,
}) : assert(
(toStorage == null && toMemory == null) ||
(toStorage != null || toMemory != null) && onClearCache != null,
'You must provide `onClearCache` callback when using `toStorage` and/or `toMemory`.',
),
super(Data<V>(isLoading: true)) {
_init();
}