Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-05-21 11:48:42 +08:00
parent 1efd62803a
commit ac60ac417b
130 changed files with 1631 additions and 2132 deletions

View File

@@ -106,12 +106,10 @@ class _EditProfilePageState extends State<EditProfilePage> {
),
),
),
onTap: () {
EasyThrottle.throttle(
'imagePicker', const Duration(milliseconds: 500), () {
_pickImg(theme);
});
},
onTap: () => EasyThrottle.throttle(
'imagePicker', const Duration(milliseconds: 500), () {
_pickImg(theme);
}),
),
divider,
_item(
@@ -135,46 +133,40 @@ class _EditProfilePageState extends State<EditProfilePage> {
theme: theme,
title: '性别',
text: _sex(response['sex']),
onTap: () {
showDialog(
context: context,
builder: (context_) => _sexDialog(response['sex']),
);
},
onTap: () => showDialog(
context: context,
builder: (context_) => _sexDialog(response['sex']),
),
),
divider,
_item(
theme: theme,
title: '出生年月',
text: response['birthday'],
onTap: () {
showDatePicker(
context: context,
initialDate: DateTime.parse(response['birthday']),
firstDate: DateTime(1900, 1, 1),
lastDate: DateTime.now(),
).then((date) {
if (date != null) {
_update(
type: ProfileType.birthday,
datum: DateFormat('yyyy-MM-dd').format(date),
);
}
});
},
onTap: () => showDatePicker(
context: context,
initialDate: DateTime.parse(response['birthday']),
firstDate: DateTime(1900, 1, 1),
lastDate: DateTime.now(),
).then((date) {
if (date != null) {
_update(
type: ProfileType.birthday,
datum: DateFormat('yyyy-MM-dd').format(date),
);
}
}),
),
divider,
_item(
theme: theme,
title: '个性签名',
text: response['sign'].isEmpty ? '' : response['sign'],
onTap: () {
_editDialog(
type: ProfileType.sign,
title: '个性签名',
text: response['sign'],
);
},
onTap: () => _editDialog(
type: ProfileType.sign,
title: '个性签名',
text: response['sign'],
),
),
divider1,
_item(
@@ -299,7 +291,7 @@ class _EditProfilePageState extends State<EditProfilePage> {
],
);
},
).then((_) {
).whenComplete(() {
_textController.clear();
});
}