mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 15:24:35 +01:00
结构初始化
This commit is contained in:
15
lib/data/service/app.dart
Normal file
15
lib/data/service/app.dart
Normal file
@@ -0,0 +1,15 @@
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:toolbox/data/model/update.dart';
|
||||
import 'package:toolbox/data/res/url.dart';
|
||||
|
||||
class AppService {
|
||||
Future<Map> getNotify() async {
|
||||
final resp = await Dio().get('$baseUrl/notify.json');
|
||||
return resp.data;
|
||||
}
|
||||
|
||||
Future<AppUpdate> getUpdate() async {
|
||||
final resp = await Dio().get('$baseUrl/update.json');
|
||||
return AppUpdate.fromJson(resp.data);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user