mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
结构初始化
This commit is contained in:
22
lib/data/provider/app.dart
Normal file
22
lib/data/provider/app.dart
Normal file
@@ -0,0 +1,22 @@
|
||||
import 'package:toolbox/core/provider_base.dart';
|
||||
import 'package:toolbox/data/service/app.dart';
|
||||
|
||||
class AppProvider extends BusyProvider {
|
||||
Map? _notify;
|
||||
Map? get notify => _notify;
|
||||
int? _newestBuild;
|
||||
int? get newestBuild => _newestBuild;
|
||||
|
||||
Future<void> loadData() async {
|
||||
setBusyState(true);
|
||||
final service = AppService();
|
||||
_notify = await service.getNotify();
|
||||
setBusyState(false);
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
void setNewestBuild(int build) {
|
||||
_newestBuild = build;
|
||||
notifyListeners();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user