mirror of
https://mirror.ghproxy.com/https://github.com/StarCitizenToolBox/app.git
synced 2024-12-24 03:33:43 +08:00
20 lines
406 B
Dart
20 lines
406 B
Dart
|
import 'package:dio/dio.dart';
|
||
|
import 'package:starcitizen_doctor/base/ui_model.dart';
|
||
|
|
||
|
class MDContentDialogUIModel extends BaseUIModel {
|
||
|
String title;
|
||
|
String url;
|
||
|
|
||
|
MDContentDialogUIModel(this.title, this.url);
|
||
|
|
||
|
String? data;
|
||
|
|
||
|
@override
|
||
|
Future loadData() async {
|
||
|
final r = await handleError(() => Dio().get(url));
|
||
|
if (r == null) return;
|
||
|
data = r.data;
|
||
|
notifyListeners();
|
||
|
}
|
||
|
}
|