app/lib/ui/home/dialogs/md_content_dialog_ui_model.dart

20 lines
435 B
Dart
Raw Normal View History

2023-10-09 09:32:07 +08:00
import 'package:starcitizen_doctor/base/ui_model.dart';
2024-02-07 22:29:15 +08:00
import 'package:starcitizen_doctor/common/io/rs_http.dart';
2023-10-09 09:32:07 +08:00
class MDContentDialogUIModel extends BaseUIModel {
String title;
String url;
MDContentDialogUIModel(this.title, this.url);
String? data;
@override
Future loadData() async {
2024-02-07 22:29:15 +08:00
final r = await handleError(() => RSHttp.getText(url));
2023-10-09 09:32:07 +08:00
if (r == null) return;
2024-02-07 22:29:15 +08:00
data = r;
2023-10-09 09:32:07 +08:00
notifyListeners();
}
}