Commit d02385fb by tanghuan

bugfix

1 parent 039cef8c
...@@ -143,7 +143,7 @@ class AccountPage extends StatelessWidget { ...@@ -143,7 +143,7 @@ class AccountPage extends StatelessWidget {
width: double.infinity, width: double.infinity,
height: 47, height: 47,
child: ElevatedButton( child: ElevatedButton(
onPressed: () async { onPressed: () {
// 判断是否有绑定手机号 // 判断是否有绑定手机号
if (state.phone != '') { if (state.phone != '') {
context.read<AccountCubit>().goLogoff(); context.read<AccountCubit>().goLogoff();
...@@ -151,7 +151,7 @@ class AccountPage extends StatelessWidget { ...@@ -151,7 +151,7 @@ class AccountPage extends StatelessWidget {
} }
final accountCubit = context.read<AccountCubit>(); final accountCubit = context.read<AccountCubit>();
bool? confirm = await showDialog<bool>( showDialog<bool>(
context: context, context: context,
builder: (BuildContext ctx) { builder: (BuildContext ctx) {
return AlertDialog( return AlertDialog(
...@@ -173,23 +173,17 @@ class AccountPage extends StatelessWidget { ...@@ -173,23 +173,17 @@ class AccountPage extends StatelessWidget {
], ],
); );
}, },
); ).then((value) {
if (value == true) {
if (confirm == true) { Fluttertoast.showToast(
// ScaffoldMessenger.of(context).showSnackBar( msg: '已申请注销,等待流程处理',
// SnackBar( backgroundColor: Colors.green,
// content: Text('已申请注销,等待流程处理'), toastLength: Toast.LENGTH_LONG,
// backgroundColor: Colors.green, gravity: ToastGravity.BOTTOM,
// ), );
// ); accountCubit.unbind();
Fluttertoast.showToast( }
msg: '已申请注销,等待流程处理', });
backgroundColor: Colors.green,
toastLength: Toast.LENGTH_LONG,
gravity: ToastGravity.BOTTOM,
);
accountCubit.unbind();
}
}, },
style: ElevatedButton.styleFrom( style: ElevatedButton.styleFrom(
backgroundColor: Color(0xFFE74C3C), backgroundColor: Color(0xFFE74C3C),
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!