From 5d65480cd52397caa59fbe9d5ae69b9b642b1560 Mon Sep 17 00:00:00 2001 From: laiiihz Date: Fri, 19 Feb 2021 16:46:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=B4=E5=83=8F=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/ui/home/personal_draw.dart | 36 +++++++++++++---------------- lib/ui/settings/user_info_page.dart | 30 +++++++++++++++--------- 2 files changed, 35 insertions(+), 31 deletions(-) diff --git a/lib/ui/home/personal_draw.dart b/lib/ui/home/personal_draw.dart index 94d208e..7cda4de 100644 --- a/lib/ui/home/personal_draw.dart +++ b/lib/ui/home/personal_draw.dart @@ -73,33 +73,29 @@ class _PersonalDrawState extends State { children: [ SizedBox(width: 32.w), //头像按钮 - AkuRoundButton( - height: 72.w, - onPressed: () {}, - child: Material( - borderRadius: BorderRadius.circular(36.w), - clipBehavior: Clip.antiAlias, - color: Colors.grey, - child: userProvider.isLogin - ? FadeInImage.assetNetwork( - placeholder: R.ASSETS_PLACEHOLDER_WEBP, - image: API.image( - userProvider.profileModel.firstImg?.url ?? '', - ), - height: 72.w, - width: 72.w, - ) - : Icon(Icons.person), - ), + Material( + borderRadius: BorderRadius.circular(36.w), + clipBehavior: Clip.antiAlias, + color: Colors.grey, + child: userProvider.isLogin + ? FadeInImage.assetNetwork( + placeholder: R.ASSETS_PLACEHOLDER_WEBP, + image: API.image( + userProvider.profileModel.firstImg?.url ?? '', + ), + height: 72.w, + width: 72.w, + ) + : Icon(Icons.person), ), SizedBox(width: 24.w), Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ //登录按钮 - userProvider.isSigned + userProvider.isLogin ? Text( - userProvider.userInfoModel.nickName, + userProvider.infoModel.nickName, style: TextStyle( color: AppStyle.primaryTextColor, fontSize: 28.sp, diff --git a/lib/ui/settings/user_info_page.dart b/lib/ui/settings/user_info_page.dart index 289f482..3008a57 100644 --- a/lib/ui/settings/user_info_page.dart +++ b/lib/ui/settings/user_info_page.dart @@ -1,7 +1,10 @@ +import 'package:aku_community_manager/const/resource.dart'; +import 'package:aku_community_manager/const/api.dart'; import 'package:aku_community_manager/provider/user_provider.dart'; import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart'; import 'package:aku_community_manager/ui/widgets/common/aku_tile.dart'; import 'package:aku_community_manager/ui/widgets/inner/pick_image.dart'; +import 'package:common_utils/common_utils.dart'; import 'package:flutter/material.dart'; import 'package:aku_community_manager/tools/screen_tool.dart'; import 'package:provider/provider.dart'; @@ -30,26 +33,31 @@ class _UserInfoPageState extends State { }, title: Text('头像'), height: 168.w, - suffix: CircleAvatar( - radius: 60.w, - backgroundColor: Colors.white, - backgroundImage: userProvider.userInfoModel.avatar == null - ? null - : FileImage(userProvider.userInfoModel.avatar), - child: userProvider.userInfoModel.avatar == null - ? Icon(Icons.person_outline) - : null, + suffix: Material( + color: Colors.grey, + borderRadius: BorderRadius.circular(36.w), + clipBehavior: Clip.antiAlias, + child: userProvider.isLogin + ? FadeInImage.assetNetwork( + placeholder: R.ASSETS_PLACEHOLDER_WEBP, + image: API.image( + userProvider.profileModel.firstImg?.url ?? '', + ), + height: 72.w, + width: 72.w, + ) + : Icon(Icons.person), ), ), AkuTile( onTap: () {}, title: Text('昵称'), - suffix: Text(userProvider.userInfoModel.nickName), + suffix: Text(userProvider.infoModel.nickName), ), AkuTile( onTap: () {}, title: Text('手机'), - suffix: Text(userProvider.userInfoModel.securePhone), + suffix: Text(TextUtil.hideNumber(userProvider.infoModel.tel)), ), ], ),