diff --git a/assets/images/home/pic_avatar_academician_female .jpg b/assets/images/home/pic_avatar_academician_female .jpg new file mode 100644 index 0000000..53997f4 Binary files /dev/null and b/assets/images/home/pic_avatar_academician_female .jpg differ diff --git a/assets/images/home/pic_avatar_academician_male.jpg b/assets/images/home/pic_avatar_academician_male.jpg new file mode 100644 index 0000000..c1202f1 Binary files /dev/null and b/assets/images/home/pic_avatar_academician_male.jpg differ diff --git a/assets/images/home/pic_avatar_painter_female.jpg b/assets/images/home/pic_avatar_painter_female.jpg new file mode 100644 index 0000000..788a17d Binary files /dev/null and b/assets/images/home/pic_avatar_painter_female.jpg differ diff --git a/assets/images/home/pic_avatar_painter_male.jpg b/assets/images/home/pic_avatar_painter_male.jpg new file mode 100644 index 0000000..7c7c64f Binary files /dev/null and b/assets/images/home/pic_avatar_painter_male.jpg differ diff --git a/lib/app/modules/home/views/explore_view.dart b/lib/app/modules/home/views/explore_view.dart index 493a4b7..74d715c 100644 --- a/lib/app/modules/home/views/explore_view.dart +++ b/lib/app/modules/home/views/explore_view.dart @@ -36,6 +36,7 @@ class ExploreView extends GetView { account: controller.account, gender: controller.gender, occupationName: controller.occupationName, + occupationId: controller.occupationId, ), ), buildTitle(context), diff --git a/lib/app/modules/home/views/home_view.dart b/lib/app/modules/home/views/home_view.dart index cb7dd74..ee20c29 100644 --- a/lib/app/modules/home/views/home_view.dart +++ b/lib/app/modules/home/views/home_view.dart @@ -114,6 +114,7 @@ class HomeView extends GetView { account: controller.account, gender: controller.gender, occupationName: controller.occupationName, + occupationId: controller.occupationId, ), ), controller.prompt.value diff --git a/lib/app/modules/home/widgets/user_widget.dart b/lib/app/modules/home/widgets/user_widget.dart index af4c24f..f5b5112 100644 --- a/lib/app/modules/home/widgets/user_widget.dart +++ b/lib/app/modules/home/widgets/user_widget.dart @@ -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( diff --git a/lib/app/shared/constants/images.dart b/lib/app/shared/constants/images.dart index 99ef6fa..79ffd72 100644 --- a/lib/app/shared/constants/images.dart +++ b/lib/app/shared/constants/images.dart @@ -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, }); diff --git a/pubspec.yaml b/pubspec.yaml index e877985..9ea21a8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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