1234567891011121314151617181920212223 |
- import 'package:cpt_profile/modules/change_mobile/change_mobile_page.dart';
- import 'package:cpt_profile/modules/setting/setting_state.dart';
- import 'package:riverpod_annotation/riverpod_annotation.dart';
- part 'setting_view_model.g.dart';
- @riverpod
- class SettingViewModel extends _$SettingViewModel {
- @override
- SettingState build() {
- return SettingState();
- }
- void changeEnableNotification(bool value) {
- state = state.copyWith(enbaleNofitication: value);
- }
- //去修改手机号码的页面
- void gotoChangeMobilePage() {
- ChangeMobilePage.startInstance();
- }
- }
|