update login

hmxc
小赖 4 years ago
parent 4cd42d56f6
commit a2f8e554b6

@ -0,0 +1,13 @@
import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:flutter/material.dart';
class AgreementPage extends StatelessWidget {
const AgreementPage({Key key}) : super(key: key);
@override
Widget build(BuildContext context) {
return AkuScaffold(
title: '服务协议',
);
}
}

@ -0,0 +1,13 @@
import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:flutter/material.dart';
class PrivacyPage extends StatelessWidget {
const PrivacyPage({Key key}) : super(key: key);
@override
Widget build(BuildContext context) {
return AkuScaffold(
title: '隐私协议',
);
}
}

@ -56,11 +56,17 @@ class _PersonalDrawState extends State<PersonalDraw> {
child: ListView( child: ListView(
children: [ children: [
SizedBox( SizedBox(
height: 80.w - 40.w + ScreenUtil().statusBarHeight, height: ScreenUtil().statusBarHeight,
), ),
//leading //leading
Container( InkWell(
margin: EdgeInsets.only(bottom: 80.w), onTap: () {
if (!userProvider.isSigned) {
Get.to(LoginPage());
}
},
child: Container(
margin: EdgeInsets.only(bottom: 80.w, top: 40.w),
width: double.infinity, width: double.infinity,
child: Row( child: Row(
children: [ children: [
@ -71,7 +77,8 @@ class _PersonalDrawState extends State<PersonalDraw> {
onPressed: () {}, onPressed: () {},
child: CircleAvatar( child: CircleAvatar(
radius: 36.w, radius: 36.w,
backgroundImage: userProvider.userInfoModel.avatar == null backgroundImage:
userProvider.userInfoModel.avatar == null
? null ? null
: FileImage(userProvider.userInfoModel.avatar), : FileImage(userProvider.userInfoModel.avatar),
backgroundColor: Colors.white, backgroundColor: Colors.white,
@ -87,25 +94,24 @@ class _PersonalDrawState extends State<PersonalDraw> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
// //
InkWell( userProvider.isSigned
onTap: () {},
child: userProvider.isSigned
? Text( ? Text(
userProvider.userInfoModel.nickName, userProvider.userInfoModel.nickName,
style: TextStyle( style: TextStyle(
color: AppStyle.primaryTextColor, color: AppStyle.primaryTextColor,
fontSize: 28.sp, fontSize: 28.sp,
fontWeight: FontWeight.bold), fontWeight: FontWeight.bold,
),
) )
: Text('登录', : Text(
'登录',
style: TextStyle( style: TextStyle(
color: AppStyle.primaryTextColor, color: AppStyle.primaryTextColor,
fontSize: 28.sp, fontSize: 28.sp,
fontWeight: FontWeight.bold)), fontWeight: FontWeight.bold,
), ),
InkWell( ),
onTap: () {}, Row(
child: Row(
children: [ children: [
Icon(Icons.location_on_outlined, size: 33.w), Icon(Icons.location_on_outlined, size: 33.w),
Text( Text(
@ -116,12 +122,12 @@ class _PersonalDrawState extends State<PersonalDraw> {
), ),
], ],
), ),
),
], ],
), ),
], ],
), ),
), ),
),
_myListTile( _myListTile(
R.ASSETS_USER_IC_PERSON_PNG, R.ASSETS_USER_IC_PERSON_PNG,
'个人信息', '个人信息',

@ -2,6 +2,8 @@ import 'dart:ui';
import 'package:aku_community_manager/style/app_style.dart'; import 'package:aku_community_manager/style/app_style.dart';
import 'package:aku_community_manager/tools/widget_tool.dart'; import 'package:aku_community_manager/tools/widget_tool.dart';
import 'package:aku_community_manager/ui/agreements/agreement_page.dart';
import 'package:aku_community_manager/ui/agreements/privacy_page.dart';
import 'package:aku_community_manager/ui/login/login_sms_page.dart'; import 'package:aku_community_manager/ui/login/login_sms_page.dart';
import 'package:aku_community_manager/ui/widgets/common/aku_back_button.dart'; import 'package:aku_community_manager/ui/widgets/common/aku_back_button.dart';
import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart'; import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart';
@ -148,6 +150,9 @@ class _LoginPageState extends State<LoginPage> {
), ),
ExtendedWidgetSpan( ExtendedWidgetSpan(
child: GestureDetector( child: GestureDetector(
onTap: () {
Get.to(AgreementPage());
},
child: Text( child: Text(
'《服务协议》', '《服务协议》',
style: TextStyle( style: TextStyle(
@ -162,6 +167,9 @@ class _LoginPageState extends State<LoginPage> {
), ),
ExtendedWidgetSpan( ExtendedWidgetSpan(
child: GestureDetector( child: GestureDetector(
onTap: () {
Get.to(PrivacyPage());
},
child: Text( child: Text(
'《隐私政策》', '《隐私政策》',
style: TextStyle( style: TextStyle(

@ -21,6 +21,7 @@ class SettingsPage extends StatefulWidget {
} }
class _SettingsPageState extends State<SettingsPage> { class _SettingsPageState extends State<SettingsPage> {
bool _info = false;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final userProvider = Provider.of<UserProvider>(context); final userProvider = Provider.of<UserProvider>(context);
@ -35,8 +36,12 @@ class _SettingsPageState extends State<SettingsPage> {
title: Text('是否接受信息通知'), title: Text('是否接受信息通知'),
arrow: false, arrow: false,
suffix: CupertinoSwitch( suffix: CupertinoSwitch(
value: false, value: _info,
onChanged: (value) {}, onChanged: (value) {
setState(() {
_info = value;
});
},
), ),
), ),
Divider(height: 1.w), Divider(height: 1.w),

Loading…
Cancel
Save