重写性别选择器,缴费记录按钮去除

hmxc
小赖 4 years ago
parent eb21d91c20
commit ae22cd8b6f

@ -260,16 +260,17 @@ class _LifePayPageState extends State<LifePayPage> {
return BeeScaffold( return BeeScaffold(
title: '生活缴费', title: '生活缴费',
actions: [ actions: [
InkWell( //TODO
onTap: () { // InkWell(
LifePayRecordPage().to(); // onTap: () {
}, // LifePayRecordPage().to();
child: Container( // },
padding: EdgeInsets.fromLTRB(32.w, 28.w, 32.w, 20.w), // child: Container(
alignment: Alignment.center, // padding: EdgeInsets.fromLTRB(32.w, 28.w, 32.w, 20.w),
child: '缴费记录'.text.black.size(28.sp).make(), // alignment: Alignment.center,
), // child: '缴费记录'.text.black.size(28.sp).make(),
), // ),
// ),
], ],
body: BeeListView( body: BeeListView(
path: API.manager.dailyPaymentList, path: API.manager.dailyPaymentList,

@ -2,6 +2,7 @@
import 'dart:io'; import 'dart:io';
// Flutter imports: // Flutter imports:
import 'package:akuCommunity/widget/picker/bee_custom_picker.dart';
import 'package:akuCommunity/widget/picker/bee_date_picker.dart'; import 'package:akuCommunity/widget/picker/bee_date_picker.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -130,14 +131,10 @@ class _UserProfilePageState extends State<UserProfilePage> {
_buildTile( _buildTile(
'性别', '性别',
userProvider.userInfoModel.sexValue.text.make(), userProvider.userInfoModel.sexValue.text.make(),
onPressed: () { onPressed: () async {
showCupertinoDialog( int result = await Get.bottomSheet(BeeCustomPicker(
context: context, onPressed: () => Get.back(result: _sex),
builder: (context) { body: CupertinoPicker(
return CupertinoAlertDialog(
title: '请选择'.text.isIntrinsic.make(),
content: SizedBox(
child: CupertinoPicker(
itemExtent: 50, itemExtent: 50,
onSelectedItemChanged: (index) { onSelectedItemChanged: (index) {
_sex = index + 1; _sex = index + 1;
@ -147,25 +144,11 @@ class _UserProfilePageState extends State<UserProfilePage> {
''.text.isIntrinsic.make().centered(), ''.text.isIntrinsic.make().centered(),
], ],
useMagnifier: true, useMagnifier: true,
), ).expand(),
height: 300.w, ));
), if (result != null) {
actions: [
CupertinoDialogAction(
child: '取消'.text.isIntrinsic.make(),
onPressed: Get.back,
),
CupertinoDialogAction(
child: '确定'.text.isIntrinsic.make(),
onPressed: () {
userProvider.setSex(_sex); userProvider.setSex(_sex);
Get.back(); }
},
),
],
);
},
);
}, },
), ),
_buildTile( _buildTile(

Loading…
Cancel
Save