Commit d02385fb by tanghuan

bugfix

1 parent 039cef8c
......@@ -143,7 +143,7 @@ class AccountPage extends StatelessWidget {
width: double.infinity,
height: 47,
child: ElevatedButton(
onPressed: () async {
onPressed: () {
// 判断是否有绑定手机号
if (state.phone != '') {
context.read<AccountCubit>().goLogoff();
......@@ -151,7 +151,7 @@ class AccountPage extends StatelessWidget {
}
final accountCubit = context.read<AccountCubit>();
bool? confirm = await showDialog<bool>(
showDialog<bool>(
context: context,
builder: (BuildContext ctx) {
return AlertDialog(
......@@ -173,15 +173,8 @@ class AccountPage extends StatelessWidget {
],
);
},
);
if (confirm == true) {
// ScaffoldMessenger.of(context).showSnackBar(
// SnackBar(
// content: Text('已申请注销,等待流程处理'),
// backgroundColor: Colors.green,
// ),
// );
).then((value) {
if (value == true) {
Fluttertoast.showToast(
msg: '已申请注销,等待流程处理',
backgroundColor: Colors.green,
......@@ -190,6 +183,7 @@ class AccountPage extends StatelessWidget {
);
accountCubit.unbind();
}
});
},
style: ElevatedButton.styleFrom(
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!