dreampad/lib/app/modules/home/providers/home_provider.dart

10 lines
321 B
Dart
Raw Normal View History

2023-11-28 10:44:58 +08:00
import 'package:dreampad/app/api/base_provider.dart';
import 'package:dreampad/app/models/app_update_model.dart';
class HomeProvider extends BaseProvider {
Future<AppUpdate?> getAppUpdate() async {
final res = await get('/api/app/version');
return res.body == null ? null : AppUpdate.fromJson(res.body);
}
}