mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: timepicker: initialTime
This commit is contained in:
@@ -426,9 +426,11 @@ class _CreatePanelState extends State<CreatePanel> {
|
|||||||
TimeOfDay nowTime = TimeOfDay.now();
|
TimeOfDay nowTime = TimeOfDay.now();
|
||||||
showTimePicker(
|
showTimePicker(
|
||||||
context: context,
|
context: context,
|
||||||
initialTime: TimeOfDay(
|
initialTime: nowTime.replacing(
|
||||||
hour: nowTime.hour,
|
hour: nowTime.minute + 10 >= 60
|
||||||
minute: nowTime.minute + 10,
|
? (nowTime.hour + 1) % 24
|
||||||
|
: nowTime.hour,
|
||||||
|
minute: (nowTime.minute + 10) % 60,
|
||||||
),
|
),
|
||||||
).then((selectedTime) {
|
).then((selectedTime) {
|
||||||
if (selectedTime != null) {
|
if (selectedTime != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user