mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 23:34:24 +01:00
16 lines
413 B
Dart
16 lines
413 B
Dart
import 'package:dio/dio.dart';
|
|
import 'package:toolbox/data/model/app/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);
|
|
}
|
|
}
|