头像对接

hmxc
小赖 4 years ago
parent 37b9334fda
commit 5d65480cd5

@ -73,33 +73,29 @@ class _PersonalDrawState extends State<PersonalDraw> {
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,

@ -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<UserInfoPage> {
},
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)),
),
],
),

Loading…
Cancel
Save