更新首页头像
This commit is contained in:
parent
e32cd247dd
commit
caa65c6ecf
BIN
assets/images/home/pic_avatar_academician_female .jpg
Normal file
BIN
assets/images/home/pic_avatar_academician_female .jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
BIN
assets/images/home/pic_avatar_academician_male.jpg
Normal file
BIN
assets/images/home/pic_avatar_academician_male.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
BIN
assets/images/home/pic_avatar_painter_female.jpg
Normal file
BIN
assets/images/home/pic_avatar_painter_female.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
BIN
assets/images/home/pic_avatar_painter_male.jpg
Normal file
BIN
assets/images/home/pic_avatar_painter_male.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
@ -36,6 +36,7 @@ class ExploreView extends GetView<HomeController> {
|
||||
account: controller.account,
|
||||
gender: controller.gender,
|
||||
occupationName: controller.occupationName,
|
||||
occupationId: controller.occupationId,
|
||||
),
|
||||
),
|
||||
buildTitle(context),
|
||||
|
@ -114,6 +114,7 @@ class HomeView extends GetView<HomeController> {
|
||||
account: controller.account,
|
||||
gender: controller.gender,
|
||||
occupationName: controller.occupationName,
|
||||
occupationId: controller.occupationId,
|
||||
),
|
||||
),
|
||||
controller.prompt.value
|
||||
|
@ -9,10 +9,12 @@ class UserWidget extends GetView {
|
||||
required this.account,
|
||||
required this.gender,
|
||||
required this.occupationName,
|
||||
required this.occupationId,
|
||||
});
|
||||
final String account;
|
||||
final int gender;
|
||||
final String occupationName;
|
||||
final int occupationId;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -28,7 +30,16 @@ class UserWidget extends GetView {
|
||||
padding: REdgeInsets.only(left: 2.0, top: 1.0, bottom: 1.0),
|
||||
child: Row(
|
||||
children: [
|
||||
Images.homeAvatar,
|
||||
switch(gender) {
|
||||
2 => switch(occupationId) {
|
||||
5 => Images.homeAvatarPainterMale,
|
||||
_ => Images.homeAvatarAcademicianMale,
|
||||
},
|
||||
_ => switch(occupationId) {
|
||||
5 => Images.homeAvatarPainterFemale,
|
||||
_ => Images.homeAvatarAcademicianFemale,
|
||||
},
|
||||
},
|
||||
Container(
|
||||
padding: REdgeInsets.all(6.0),
|
||||
child: Column(
|
||||
|
@ -117,6 +117,34 @@ class Images {
|
||||
width: 67.w,
|
||||
);
|
||||
|
||||
static Widget homeAvatarAcademicianFemale = LoadAssetImage(
|
||||
'home/pic_avatar_academician_female',
|
||||
format: ImageFormat.jpg,
|
||||
height: 67.w,
|
||||
width: 67.w,
|
||||
);
|
||||
|
||||
static Widget homeAvatarAcademicianMale = LoadAssetImage(
|
||||
'home/pic_avatar_academician_male',
|
||||
format: ImageFormat.jpg,
|
||||
height: 67.w,
|
||||
width: 67.w,
|
||||
);
|
||||
|
||||
static Widget homeAvatarPainterFemale = LoadAssetImage(
|
||||
'home/pic_avatar_painter_female',
|
||||
format: ImageFormat.jpg,
|
||||
height: 67.w,
|
||||
width: 67.w,
|
||||
);
|
||||
|
||||
static Widget homeAvatarPainterMale = LoadAssetImage(
|
||||
'home/pic_avatar_painter_male',
|
||||
format: ImageFormat.jpg,
|
||||
height: 67.w,
|
||||
width: 67.w,
|
||||
);
|
||||
|
||||
static Widget homeBeginGray = LoadAssetImage(
|
||||
'home/btn_icon_begin_gray',
|
||||
height: 66.w,
|
||||
@ -336,7 +364,6 @@ class Images {
|
||||
|
||||
class _FadeInAndOut extends HookWidget {
|
||||
const _FadeInAndOut({
|
||||
super.key,
|
||||
required this.child,
|
||||
});
|
||||
|
||||
@ -376,7 +403,6 @@ class _FadeInAndOut extends HookWidget {
|
||||
|
||||
class _UpAndDown extends HookWidget {
|
||||
const _UpAndDown({
|
||||
super.key,
|
||||
required this.child,
|
||||
});
|
||||
|
||||
|
@ -3,7 +3,7 @@ version: 0.1.1
|
||||
publish_to: none
|
||||
description: Dream Pad.
|
||||
environment:
|
||||
sdk: '>=2.18.5 <3.0.0'
|
||||
sdk: '>=3.0.0 <4.0.0'
|
||||
|
||||
dependencies:
|
||||
cupertino_icons: ^1.0.6
|
||||
|
Loading…
Reference in New Issue
Block a user