diff --git a/assets/icons/hot_fire.png b/assets/icons/hot_fire.png new file mode 100644 index 00000000..c2131ad4 Binary files /dev/null and b/assets/icons/hot_fire.png differ diff --git a/lib/const/resource.dart b/lib/const/resource.dart index 45cbb900..9e375542 100644 --- a/lib/const/resource.dart +++ b/lib/const/resource.dart @@ -236,6 +236,9 @@ class R { static const String ASSETS_ICONS_GROUPBUY_TAB_UNSELECTED_PNG = 'assets/icons/groupbuy_tab_unselected.png'; + /// ![preview](file:///Users/akufe/Documents/akuCommunity/assets/icons/hot_fire.png) + static const String ASSETS_ICONS_HOT_FIRE_PNG = 'assets/icons/hot_fire.png'; + /// ![preview](file:///Users/akufe/Documents/akuCommunity/assets/icons/house.png) static const String ASSETS_ICONS_HOUSE_PNG = 'assets/icons/house.png'; diff --git a/lib/pages/personal/user_profile_page.dart b/lib/pages/personal/user_profile_page.dart index 67646cec..b073c9fe 100644 --- a/lib/pages/personal/user_profile_page.dart +++ b/lib/pages/personal/user_profile_page.dart @@ -2,6 +2,7 @@ import 'dart:io'; // Flutter imports: +import 'package:akuCommunity/widget/picker/bee_date_picker.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -170,46 +171,9 @@ class _UserProfilePageState extends State { _buildTile( '出生日期', userProvider.userInfoModel.birthdayValue.text.make(), - onPressed: () { - Get.dialog( - CupertinoAlertDialog( - title: '请选择'.text.isIntrinsic.make(), - content: SizedBox( - height: 340.w, - child: CupertinoTheme( - data: CupertinoThemeData( - textTheme: CupertinoTextThemeData( - dateTimePickerTextStyle: TextStyle( - fontSize: 30.sp, - color: Colors.black87, - ), - ), - ), - child: CupertinoDatePicker( - maximumYear: DateTime.now().year, - minimumYear: 1900, - mode: CupertinoDatePickerMode.date, - onDateTimeChanged: (date) { - _birthday = date; - }, - ), - ), - ), - actions: [ - CupertinoDialogAction( - child: '取消'.text.isIntrinsic.make(), - onPressed: Get.back, - ), - CupertinoDialogAction( - child: '确定'.text.isIntrinsic.make(), - onPressed: () { - userProvider.setBirthday(_birthday); - Get.back(); - }, - ), - ], - ), - ); + onPressed: () async { + DateTime date = await BeeDatePicker.pick(DateTime.now()); + if (date != null) userProvider.setBirthday(date); }, ), ].sepWidget( diff --git a/lib/ui/community/community_views/topic/topic_community_view.dart b/lib/ui/community/community_views/topic/topic_community_view.dart index 5b73c38e..3706645b 100644 --- a/lib/ui/community/community_views/topic/topic_community_view.dart +++ b/lib/ui/community/community_views/topic/topic_community_view.dart @@ -91,15 +91,32 @@ class TopicCommunityViewState extends State .bold .overflow(TextOverflow.ellipsis) .make(), + Spacer(), (model?.content ?? '') .text .maxLines(1) .size(22.sp) + .color(Color(0xFF666666)) .overflow(TextOverflow.ellipsis) .make(), - 12.hb, + 21.hb, + [ + Spacer(), + Image.asset( + R.ASSETS_ICONS_HOT_FIRE_PNG, + height: 24.w, + width: 24.w, + ), + 12.wb, + '${model?.activityNum}' + .text + .maxLines(1) + .size(22.sp) + .overflow(TextOverflow.ellipsis) + .make() + ].row(), ], - ).expand(), + ).box.height(160.w).make().expand(), ], ), );