12345678910111213141516171819202122 |
- import 'package:eitc_erm_dental_flutter/funcs.dart';
- import 'package:eitc_erm_dental_flutter/http/api_service.dart';
- import 'package:eitc_erm_dental_flutter/http/http.dart';
- import 'package:riverpod_annotation/riverpod_annotation.dart';
- import '../../../entity/clinic_info.dart';
- part 'upload_view_model.g.dart';
- ///医院列表
- @riverpod
- Future<List<ClinicInfo>> clinicList(ClinicListRef ref) async {
- try {
- List<ClinicInfo>? list = await Http.instance
- .request(ApiService(Http.instance.dio).getClinicList());
- return list ?? [];
- } catch (e) {
- loge("获取医院列表异常", error: e);
- }
- return [];
- }
|