日期选择器更新

hmxc
小赖 4 years ago
parent 1f504c3b8b
commit 373b910f1d

@ -83,7 +83,7 @@ List<AO> userAppObjects = [
AO('我的车', R.ASSETS_ICONS_USER_ICON_WDC_PNG, MineCarPage()), AO('我的车', R.ASSETS_ICONS_USER_ICON_WDC_PNG, MineCarPage()),
AO('社区活动', R.ASSETS_ICONS_USER_ICON_WDSQHD_PNG, ActivityListPage()), AO('社区活动', R.ASSETS_ICONS_USER_ICON_WDSQHD_PNG, ActivityListPage()),
AO('我的缴费', R.ASSETS_ICONS_USER_ICON_WDJF_PNG, LifePayPage()), AO('我的缴费', R.ASSETS_ICONS_USER_ICON_WDJF_PNG, LifePayPage()),
AO('我的', R.ASSETS_ICONS_USER_ICON_WDBX_PNG, FixedSubmitPage()), AO('我的', R.ASSETS_ICONS_USER_ICON_WDBX_PNG, FixedSubmitPage()),
AO('我的地址', R.ASSETS_ICONS_USER_ICON_WDDZ_PNG, AddressPage()), AO('我的地址', R.ASSETS_ICONS_USER_ICON_WDDZ_PNG, AddressPage()),
AO('我的管家', R.ASSETS_ICONS_USER_ICON_WDGJ_PNG, Scaffold()), AO('我的管家', R.ASSETS_ICONS_USER_ICON_WDGJ_PNG, Scaffold()),
AO('我的访客', R.ASSETS_ICONS_USER_ICON_WDFK_PNG, VisitorAccessPage()), AO('我的访客', R.ASSETS_ICONS_USER_ICON_WDFK_PNG, VisitorAccessPage()),

@ -1,4 +1,5 @@
// Flutter imports: // Flutter imports:
import 'package:akuCommunity/widget/picker/bee_custom_picker.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -50,36 +51,16 @@ class __BeeDatePickerState extends State<_BeeDatePicker> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return SizedBox( return BeeCustomPicker(
child: Material( onPressed: () => Get.back(result: _date),
borderRadius: BorderRadius.vertical(top: Radius.circular(10)), body: CupertinoDatePicker(
child: Column( use24hFormat: widget.use24H,
children: [ maximumDate: widget.max,
SizedBox( minimumDate: widget.min,
height: 48, initialDateTime: _date,
child: NavigationToolbar( onDateTimeChanged: (date) => _date = date,
leading: TextButton( mode: widget.mode ?? CupertinoDatePickerMode.date,
onPressed: Get.back, ).expand(),
child: '取消'.text.black.make(),
),
trailing: TextButton(
onPressed: () => Get.back(result: _date),
child: '确定'.text.black.make(),
),
),
),
CupertinoDatePicker(
use24hFormat: widget.use24H,
maximumDate: widget.max,
minimumDate: widget.min,
initialDateTime: _date,
onDateTimeChanged: (date) => _date = date,
mode:widget.mode?? CupertinoDatePickerMode.date,
).expand(),
],
),
),
height: Get.height / 3,
); );
} }
} }

Loading…
Cancel
Save