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,56 +56,62 @@ 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: () {
width: double.infinity, if (!userProvider.isSigned) {
child: Row( Get.to(LoginPage());
children: [ }
SizedBox(width: 32.w), },
// child: Container(
AkuRoundButton( margin: EdgeInsets.only(bottom: 80.w, top: 40.w),
height: 72.w, width: double.infinity,
onPressed: () {}, child: Row(
child: CircleAvatar( children: [
radius: 36.w, SizedBox(width: 32.w),
backgroundImage: userProvider.userInfoModel.avatar == null //
? null AkuRoundButton(
: FileImage(userProvider.userInfoModel.avatar), height: 72.w,
backgroundColor: Colors.white, onPressed: () {},
child: userProvider.isSigned child: CircleAvatar(
? userProvider.userInfoModel.avatar == null radius: 36.w,
? Icon(Icons.person_outline) backgroundImage:
: null userProvider.userInfoModel.avatar == null
: Icon(Icons.person), ? null
), : FileImage(userProvider.userInfoModel.avatar),
), backgroundColor: Colors.white,
SizedBox(width: 24.w),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
//
InkWell(
onTap: () {},
child: userProvider.isSigned child: userProvider.isSigned
? userProvider.userInfoModel.avatar == null
? Icon(Icons.person_outline)
: null
: Icon(Icons.person),
),
),
SizedBox(width: 24.w),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
//
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,10 +122,10 @@ class _PersonalDrawState extends State<PersonalDraw> {
), ),
], ],
), ),
), ],
], ),
), ],
], ),
), ),
), ),
_myListTile( _myListTile(

@ -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