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(
children: [
SizedBox(
height: 80.w - 40.w + ScreenUtil().statusBarHeight,
height: ScreenUtil().statusBarHeight,
),
//leading
Container(
margin: EdgeInsets.only(bottom: 80.w),
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: [
@ -71,7 +77,8 @@ class _PersonalDrawState extends State<PersonalDraw> {
onPressed: () {},
child: CircleAvatar(
radius: 36.w,
backgroundImage: userProvider.userInfoModel.avatar == null
backgroundImage:
userProvider.userInfoModel.avatar == null
? null
: FileImage(userProvider.userInfoModel.avatar),
backgroundColor: Colors.white,
@ -87,25 +94,24 @@ class _PersonalDrawState extends State<PersonalDraw> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
//
InkWell(
onTap: () {},
child: userProvider.isSigned
userProvider.isSigned
? Text(
userProvider.userInfoModel.nickName,
style: TextStyle(
color: AppStyle.primaryTextColor,
fontSize: 28.sp,
fontWeight: FontWeight.bold),
fontWeight: FontWeight.bold,
),
)
: Text('登录',
: Text(
'登录',
style: TextStyle(
color: AppStyle.primaryTextColor,
fontSize: 28.sp,
fontWeight: FontWeight.bold)),
fontWeight: FontWeight.bold,
),
InkWell(
onTap: () {},
child: Row(
),
Row(
children: [
Icon(Icons.location_on_outlined, size: 33.w),
Text(
@ -116,12 +122,12 @@ class _PersonalDrawState extends State<PersonalDraw> {
),
],
),
),
],
),
],
),
),
),
_myListTile(
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/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