15 lines
386 B
Dart
15 lines
386 B
Dart
import 'package:flutter/cupertino.dart';
|
|
import 'package:food_health/api/dto/user_profile_dto.dart';
|
|
import 'package:food_health/api/endpoints/profile_api.dart';
|
|
|
|
class UserStore with ChangeNotifier {
|
|
UserProfileDto profile = UserProfileDto();
|
|
|
|
//初始化数据
|
|
Future<void> init() async {
|
|
var res = await getUserProfileApi();
|
|
profile = res;
|
|
notifyListeners();
|
|
}
|
|
}
|