You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
aku_new_community/lib/pages/setting_page/account_manager_page.dart

67 lines
2.1 KiB

import 'package:aku_new_community/constants/saas_api.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
3 years ago
import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart';
3 years ago
import 'package:aku_new_community/pages/sign/login/other_login_page.dart';
import 'package:aku_new_community/widget/bee_scaffold.dart';
import '../../utils/network/base_model.dart';
import '../../utils/network/net_util.dart';
class AccountManagerPage extends StatefulWidget {
4 years ago
AccountManagerPage({Key? key}) : super(key: key);
@override
_AccountManagerPageState createState() => _AccountManagerPageState();
}
class _AccountManagerPageState extends State<AccountManagerPage> {
@override
Widget build(BuildContext context) {
return BeeScaffold(
title: '账号管理',
body: ListView(
children: [
ListTile(
title: '账号注销'.text.red500.make(),
onTap: () {
showCupertinoModalPopup(
context: context,
builder: (context) {
return CupertinoActionSheet(
message: Text('注销当前账号'),
actions: [
CupertinoDialogAction(
child: Text(
'确定',
style: TextStyle(
color: Colors.red.withOpacity(0.7),
),
),
onPressed: () async {
BaseModel baseModel =
await NetUtil().post(SAASAPI.login.logOut);
if (baseModel.success) {
Get.offAll(() => OtherLoginPage());
}
},
),
],
cancelButton: CupertinoDialogAction(
child: Text('取消'),
onPressed: Get.back,
),
);
},
);
},
).material(color: Colors.white),
],
),
);
}
}