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,15 +173,8 @@ class AccountPage extends StatelessWidget { ...@@ -173,15 +173,8 @@ class AccountPage extends StatelessWidget {
], ],
); );
}, },
); ).then((value) {
if (value == true) {
if (confirm == true) {
// ScaffoldMessenger.of(context).showSnackBar(
// SnackBar(
// content: Text('已申请注销,等待流程处理'),
// backgroundColor: Colors.green,
// ),
// );
Fluttertoast.showToast( Fluttertoast.showToast(
msg: '已申请注销,等待流程处理', msg: '已申请注销,等待流程处理',
backgroundColor: Colors.green, backgroundColor: Colors.green,
...@@ -190,6 +183,7 @@ class AccountPage extends StatelessWidget { ...@@ -190,6 +183,7 @@ class AccountPage extends StatelessWidget {
); );
accountCubit.unbind(); 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!