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(
children: [
SizedBox(
height: 80.w - 40.w + ScreenUtil().statusBarHeight,
height: ScreenUtil().statusBarHeight,
),
//leading
Container(
margin: EdgeInsets.only(bottom: 80.w),
width: double.infinity,
child: Row(
children: [
SizedBox(width: 32.w),
//
AkuRoundButton(
height: 72.w,
onPressed: () {},
child: CircleAvatar(
radius: 36.w,
backgroundImage: userProvider.userInfoModel.avatar == null
? null
: FileImage(userProvider.userInfoModel.avatar),
backgroundColor: Colors.white,
child: userProvider.isSigned
? userProvider.userInfoModel.avatar == null
? Icon(Icons.person_outline)
: null
: Icon(Icons.person),
),
),
SizedBox(width: 24.w),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
//
InkWell(
onTap: () {},
InkWell(
onTap: () {
if (!userProvider.isSigned) {
Get.to(LoginPage());
}
},
child: Container(
margin: EdgeInsets.only(bottom: 80.w, top: 40.w),
width: double.infinity,
child: Row(
children: [
SizedBox(width: 32.w),
//
AkuRoundButton(
height: 72.w,
onPressed: () {},
child: CircleAvatar(
radius: 36.w,
backgroundImage:
userProvider.userInfoModel.avatar == null
? null
: FileImage(userProvider.userInfoModel.avatar),
backgroundColor: Colors.white,
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(
userProvider.userInfoModel.nickName,
style: TextStyle(
color: AppStyle.primaryTextColor,
fontSize: 28.sp,
fontWeight: FontWeight.bold),
color: AppStyle.primaryTextColor,
fontSize: 28.sp,
fontWeight: FontWeight.bold,
),
)
: Text('登录',
: Text(
'登录',
style: TextStyle(
color: AppStyle.primaryTextColor,
fontSize: 28.sp,
fontWeight: FontWeight.bold)),
),
InkWell(
onTap: () {},
child: Row(
color: AppStyle.primaryTextColor,
fontSize: 28.sp,
fontWeight: FontWeight.bold,
),
),
Row(
children: [
Icon(Icons.location_on_outlined, size: 33.w),
Text(
@ -116,10 +122,10 @@ class _PersonalDrawState extends State<PersonalDraw> {
),
],
),
),
],
),
],
],
),
],
),
),
),
_myListTile(

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

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

Loading…
Cancel
Save