settings page add account manager page

hmxc
小赖 4 years ago
parent d1d811b19e
commit 859824680f

@ -85,11 +85,6 @@ class _PersonalIndexState extends State<PersonalIndex>
GridButton('待发货', R.ASSETS_ICONS_USER_ICON_DFH_PNG, () {}),
GridButton('待收货', R.ASSETS_ICONS_USER_ICON_DSH_PNG, () {}),
];
@override
void initState() {
super.initState();
NetUtil().get('test');
}
SliverAppBar _sliverAppBar(double height) {
final userProvider = Provider.of<UserProvider>(context);
@ -252,41 +247,41 @@ class _PersonalIndexState extends State<PersonalIndex>
physics: AlwaysScrollableScrollPhysics(parent: BouncingScrollPhysics()),
slivers: <Widget>[
_sliverAppBar(_statusHeight),
SliverToBoxAdapter(
child: _containerBar('我的订单'),
),
SliverToBoxAdapter(
child: Container(
margin: EdgeInsets.only(top: 10.w),
color: BaseStyle.colorf9f9f9,
child: GridButtons(
gridList: _orderList,
crossCount: 5,
),
),
),
SliverToBoxAdapter(
child: Container(
margin: EdgeInsets.only(top: 32.w, left: 32.w, right: 32.w),
child: Divider(
color: Color(0xffd8d8d8),
),
),
),
SliverToBoxAdapter(
child: _containerBar('我的团购'),
),
SliverToBoxAdapter(
child: Container(
color: BaseStyle.colorf9f9f9,
margin: EdgeInsets.only(top: 10.w),
alignment: Alignment.center,
child: GridButtons(
gridList: _groupOrderList,
crossCount: 5,
),
),
),
// SliverToBoxAdapter(
// child: _containerBar('我的订单'),
// ),
// SliverToBoxAdapter(
// child: Container(
// margin: EdgeInsets.only(top: 10.w),
// color: BaseStyle.colorf9f9f9,
// child: GridButtons(
// gridList: _orderList,
// crossCount: 5,
// ),
// ),
// ),
// SliverToBoxAdapter(
// child: Container(
// margin: EdgeInsets.only(top: 32.w, left: 32.w, right: 32.w),
// child: Divider(
// color: Color(0xffd8d8d8),
// ),
// ),
// ),
// SliverToBoxAdapter(
// child: _containerBar('我的团购'),
// ),
// SliverToBoxAdapter(
// child: Container(
// color: BaseStyle.colorf9f9f9,
// margin: EdgeInsets.only(top: 10.w),
// alignment: Alignment.center,
// child: GridButtons(
// gridList: _groupOrderList,
// crossCount: 5,
// ),
// ),
// ),
SliverToBoxAdapter(
child: SingleAdSpace(
imagePath: 'assets/example/guanggao7.png',

@ -0,0 +1,58 @@
import 'package:akuCommunity/pages/sign/sign_in_page.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart';
class AccountManagerPage extends StatefulWidget {
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: [
CupertinoButton(
child: Text(
'确定',
style: TextStyle(
color: Colors.red.withOpacity(0.7),
),
),
onPressed: () {
Get.offAll(SignInPage());
},
),
],
cancelButton: CupertinoButton(
child: Text('取消'),
onPressed: () {
Get.back();
},
),
);
},
);
},
),
],
),
);
}
}

@ -1,6 +1,7 @@
import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/extensions/num_ext.dart';
import 'package:akuCommunity/pages/setting_page/about_page/about_page.dart';
import 'package:akuCommunity/pages/setting_page/account_manager_page.dart';
import 'package:akuCommunity/pages/setting_page/feedback_page/feedback_page.dart';
import 'package:akuCommunity/pages/setting_page/invite_page/invite_page.dart';
import 'package:akuCommunity/pages/sign/sign_in_page.dart';
@ -135,39 +136,11 @@ class _SettingsPageState extends State<SettingsPage> {
),
_buildTile(
title: '意见反馈',
onTap: () => FeedBackPage().to(),
onTap: FeedBackPage().to,
),
_buildTile(
title: '账号管理',
onTap: () {
showCupertinoModalPopup(
context: context,
builder: (context) {
return CupertinoActionSheet(
message: Text('退出注销当前账号'),
actions: [
CupertinoButton(
child: Text(
'确定',
style: TextStyle(
color: Colors.red.withOpacity(0.7),
),
),
onPressed: () {
Get.offAll(SignInPage());
},
),
],
cancelButton: CupertinoButton(
child: Text('取消'),
onPressed: () {
Get.back();
},
),
);
},
);
},
onTap: AccountManagerPage().to,
),
].sepWidget(
separate: Divider(

@ -90,6 +90,7 @@ class _SignInPageState extends State<SignInPage> {
if (response.data['status']) {
if (response.data['choose'] == 1) {
userProvider.setLogin(response.data['token']);
cancel();
Get.offAll(TabNavigator());
} else {
cancel();

@ -22,7 +22,7 @@ class LoggerDioSuccess extends StatelessWidget {
5.wb,
response.request.path.text.bold.make().expand(),
Chip(
backgroundColor: Colors.redAccent,
backgroundColor: Colors.green,
label: Text(response?.statusCode?.toString() ?? 'UNKNOW'),
),
5.wb,

Loading…
Cancel
Save