话题页面添加热度,个人资料页面出生日期选择器切换

hmxc
小赖 4 years ago
parent 851ba38d3e
commit 010011b32b

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

@ -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';

@ -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<UserProfilePage> {
_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(

@ -91,15 +91,32 @@ class TopicCommunityViewState extends State<TopicCommunityView>
.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(),
],
),
);

Loading…
Cancel
Save