|
|
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:one_key/utils/dialog_util.dart';
|
|
|
|
import 'package:one_key/utils/utils.dart';
|
|
...
|
...
|
@@ -9,76 +8,76 @@ class SetTimeWidget { |
|
|
|
static SetTimeWidget init = SetTimeWidget();
|
|
|
|
static List dateData = [
|
|
|
|
{
|
|
|
|
'深夜00时': [00, 15, 30, 45]
|
|
|
|
'深夜00时': [0, 10, 15, 20, 30, 40, 45, 50]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'深夜01时': [00, 15, 30, 45]
|
|
|
|
'深夜01时': [0, 10, 15, 20, 30, 40, 45, 50]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'深夜02时': [00, 15, 30, 45]
|
|
|
|
'深夜02时': [0, 10, 15, 20, 30, 40, 45, 50]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'深夜03时': [00, 15, 30, 45]
|
|
|
|
'深夜03时': [0, 10, 15, 20, 30, 40, 45, 50]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'深夜04时': [00, 15, 30, 45]
|
|
|
|
'深夜04时': [0, 10, 15, 20, 30, 40, 45, 50]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'深夜05时': [00, 15, 30, 45]
|
|
|
|
'深夜05时': [0, 10, 15, 20, 30, 40, 45, 50]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'早上06时': [00, 15, 30, 45]
|
|
|
|
'早上06时': [0, 10, 15, 20, 30, 40, 45, 50]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'早上07时': [00, 15, 30, 45]
|
|
|
|
'早上07时': [0, 10, 15, 20, 30, 40, 45, 50]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'早上08时': [00, 15, 30, 45]
|
|
|
|
'早上08时': [0, 10, 15, 20, 30, 40, 45, 50]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'早上09时': [00, 15, 30, 45]
|
|
|
|
'早上09时': [0, 10, 15, 20, 30, 40, 45, 50]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'中午10时': [00, 15, 30, 45]
|
|
|
|
'中午10时': [0, 10, 15, 20, 30, 40, 45, 50]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'中午11时': [00, 15, 30, 45]
|
|
|
|
'中午11时': [0, 10, 15, 20, 30, 40, 45, 50]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'中午12时': [00, 15, 30, 45]
|
|
|
|
'中午12时': [0, 10, 15, 20, 30, 40, 45, 50]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'中午13时': [00, 15, 30, 45]
|
|
|
|
'中午13时': [0, 10, 15, 20, 30, 40, 45, 50]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'中午14时': [00, 15, 30, 45]
|
|
|
|
'中午14时': [0, 10, 15, 20, 30, 40, 45, 50]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'下午15时': [00, 15, 30, 45]
|
|
|
|
'下午15时': [0, 10, 15, 20, 30, 40, 45, 50]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'下午16时': [00, 15, 30, 45]
|
|
|
|
'下午16时': [0, 10, 15, 20, 30, 40, 45, 50]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'下午17时': [00, 15, 30, 45]
|
|
|
|
'下午17时': [0, 10, 15, 20, 30, 40, 45, 50]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'下午18时': [00, 15, 30, 45]
|
|
|
|
'下午18时': [0, 10, 15, 20, 30, 40, 45, 50]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'晚上19时': [00, 15, 30, 45]
|
|
|
|
'晚上19时': [0, 10, 15, 20, 30, 40, 45, 50]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'晚上20时': [00, 15, 30, 45]
|
|
|
|
'晚上20时': [0, 10, 15, 20, 30, 40, 45, 50]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'晚上21时': [00, 15, 30, 45]
|
|
|
|
'晚上21时': [0, 10, 15, 20, 30, 40, 45, 50]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'晚上22时': [00, 15, 30, 45]
|
|
|
|
'晚上22时': [0, 10, 15, 20, 30, 40, 45, 50]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'晚上23时': [00, 15, 30, 45]
|
|
|
|
'晚上23时': [0, 10, 15, 20, 30, 40, 45, 50]
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
...
|
...
|
@@ -202,10 +201,14 @@ class SetTimeWidget { |
|
|
|
context, data, hourAndMinute, SetTimeCallback setTimeCallback) {
|
|
|
|
DialogUtil.showSelectCusmanTimerDialog(context, data, (value) {
|
|
|
|
setTimeCallback(value);
|
|
|
|
}, selecteds:hourAndMinute == null?[]: [
|
|
|
|
_getFirSelected(hourAndMinute, data),
|
|
|
|
_getSecSelected(hourAndMinute, data)
|
|
|
|
]).then((value) {
|
|
|
|
},
|
|
|
|
selecteds: hourAndMinute == null
|
|
|
|
? []
|
|
|
|
: [
|
|
|
|
_getFirSelected(hourAndMinute, data),
|
|
|
|
_getSecSelected(hourAndMinute, data)
|
|
|
|
])
|
|
|
|
.then((value) {
|
|
|
|
print(value);
|
|
|
|
});
|
|
|
|
}
|
...
|
...
|
|