更新首页头像
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,
|
account: controller.account,
|
||||||
gender: controller.gender,
|
gender: controller.gender,
|
||||||
occupationName: controller.occupationName,
|
occupationName: controller.occupationName,
|
||||||
|
occupationId: controller.occupationId,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
buildTitle(context),
|
buildTitle(context),
|
||||||
|
@ -114,6 +114,7 @@ class HomeView extends GetView<HomeController> {
|
|||||||
account: controller.account,
|
account: controller.account,
|
||||||
gender: controller.gender,
|
gender: controller.gender,
|
||||||
occupationName: controller.occupationName,
|
occupationName: controller.occupationName,
|
||||||
|
occupationId: controller.occupationId,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
controller.prompt.value
|
controller.prompt.value
|
||||||
|
@ -9,10 +9,12 @@ class UserWidget extends GetView {
|
|||||||
required this.account,
|
required this.account,
|
||||||
required this.gender,
|
required this.gender,
|
||||||
required this.occupationName,
|
required this.occupationName,
|
||||||
|
required this.occupationId,
|
||||||
});
|
});
|
||||||
final String account;
|
final String account;
|
||||||
final int gender;
|
final int gender;
|
||||||
final String occupationName;
|
final String occupationName;
|
||||||
|
final int occupationId;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -28,7 +30,16 @@ class UserWidget extends GetView {
|
|||||||
padding: REdgeInsets.only(left: 2.0, top: 1.0, bottom: 1.0),
|
padding: REdgeInsets.only(left: 2.0, top: 1.0, bottom: 1.0),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Images.homeAvatar,
|
switch(gender) {
|
||||||
|
2 => switch(occupationId) {
|
||||||
|
5 => Images.homeAvatarPainterMale,
|
||||||
|
_ => Images.homeAvatarAcademicianMale,
|
||||||
|
},
|
||||||
|
_ => switch(occupationId) {
|
||||||
|
5 => Images.homeAvatarPainterFemale,
|
||||||
|
_ => Images.homeAvatarAcademicianFemale,
|
||||||
|
},
|
||||||
|
},
|
||||||
Container(
|
Container(
|
||||||
padding: REdgeInsets.all(6.0),
|
padding: REdgeInsets.all(6.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
|
@ -117,6 +117,34 @@ class Images {
|
|||||||
width: 67.w,
|
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(
|
static Widget homeBeginGray = LoadAssetImage(
|
||||||
'home/btn_icon_begin_gray',
|
'home/btn_icon_begin_gray',
|
||||||
height: 66.w,
|
height: 66.w,
|
||||||
@ -336,7 +364,6 @@ class Images {
|
|||||||
|
|
||||||
class _FadeInAndOut extends HookWidget {
|
class _FadeInAndOut extends HookWidget {
|
||||||
const _FadeInAndOut({
|
const _FadeInAndOut({
|
||||||
super.key,
|
|
||||||
required this.child,
|
required this.child,
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -376,7 +403,6 @@ class _FadeInAndOut extends HookWidget {
|
|||||||
|
|
||||||
class _UpAndDown extends HookWidget {
|
class _UpAndDown extends HookWidget {
|
||||||
const _UpAndDown({
|
const _UpAndDown({
|
||||||
super.key,
|
|
||||||
required this.child,
|
required this.child,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ version: 0.1.1
|
|||||||
publish_to: none
|
publish_to: none
|
||||||
description: Dream Pad.
|
description: Dream Pad.
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=2.18.5 <3.0.0'
|
sdk: '>=3.0.0 <4.0.0'
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
cupertino_icons: ^1.0.6
|
cupertino_icons: ^1.0.6
|
||||||
|
Loading…
Reference in New Issue
Block a user