mirror of
https://github.com/zapstore/zapstore.git
synced 2026-10-06 13:08:24 +00:00
13 lines
322 B
Dart
13 lines
322 B
Dart
import 'package:flutter_data/flutter_data.dart';
|
|
|
|
abstract class PreloadingStateNotifier<T> extends StateNotifier<AsyncValue<T>> {
|
|
final Ref ref;
|
|
PreloadingStateNotifier(this.ref) : super(AsyncLoading()) {
|
|
state = fetchLocal();
|
|
fetchRemote();
|
|
}
|
|
|
|
AsyncValue<T> fetchLocal();
|
|
Future<void> fetchRemote();
|
|
}
|