|
|
@ -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,42 +131,24 @@ 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(
|
|
|
|
itemExtent: 50,
|
|
|
|
title: '请选择'.text.isIntrinsic.make(),
|
|
|
|
onSelectedItemChanged: (index) {
|
|
|
|
content: SizedBox(
|
|
|
|
_sex = index + 1;
|
|
|
|
child: CupertinoPicker(
|
|
|
|
},
|
|
|
|
itemExtent: 50,
|
|
|
|
children: [
|
|
|
|
onSelectedItemChanged: (index) {
|
|
|
|
'男'.text.isIntrinsic.make().centered(),
|
|
|
|
_sex = index + 1;
|
|
|
|
'女'.text.isIntrinsic.make().centered(),
|
|
|
|
},
|
|
|
|
],
|
|
|
|
children: [
|
|
|
|
useMagnifier: true,
|
|
|
|
'男'.text.isIntrinsic.make().centered(),
|
|
|
|
).expand(),
|
|
|
|
'女'.text.isIntrinsic.make().centered(),
|
|
|
|
));
|
|
|
|
],
|
|
|
|
if (result != null) {
|
|
|
|
useMagnifier: true,
|
|
|
|
userProvider.setSex(_sex);
|
|
|
|
),
|
|
|
|
}
|
|
|
|
height: 300.w,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
actions: [
|
|
|
|
|
|
|
|
CupertinoDialogAction(
|
|
|
|
|
|
|
|
child: '取消'.text.isIntrinsic.make(),
|
|
|
|
|
|
|
|
onPressed: Get.back,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
CupertinoDialogAction(
|
|
|
|
|
|
|
|
child: '确定'.text.isIntrinsic.make(),
|
|
|
|
|
|
|
|
onPressed: () {
|
|
|
|
|
|
|
|
userProvider.setSex(_sex);
|
|
|
|
|
|
|
|
Get.back();
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
_buildTile(
|
|
|
|
_buildTile(
|
|
|
|