Commit 786986ea942184363db78d88b1f7daf7de8474ca

Authored by weixin_45529955
1 parent 6267611f

ff

... ... @@ -112,15 +112,11 @@ class _StoreBaseInfoPageState extends State<StoreBaseInfoPage> {
///从时间选择器中获取分钟数字符串 00 or 30
String _getMinuteStrFromPicker(List value) {
if (value[1] == 0) {
int? minute = SetTimeWidget.dateData[value[0]].values.last[value[1]];
if (minute == 0) {
return '00';
} else if (value[1] == 1) {
return '15';
}
if (value[1] == 2) {
return '30';
}
return '45';
return '${minute}';
}
@override
... ... @@ -1930,7 +1926,8 @@ class _StoreBaseInfoPageState extends State<StoreBaseInfoPage> {
FocusScope.of(context).requestFocus(
FocusNode()); //点击空白处隐藏键盘
},
keyboardType: TextInputType.numberWithOptions(),
keyboardType:
TextInputType.numberWithOptions(),
),
)),
HEmptyView(20),
... ... @@ -2016,7 +2013,8 @@ class _StoreBaseInfoPageState extends State<StoreBaseInfoPage> {
.requestFocus(
FocusNode()); //点击空白处隐藏键盘
},
keyboardType: TextInputType.numberWithOptions(),
keyboardType: TextInputType
.numberWithOptions(),
),
)),
HEmptyView(20),
... ...
... ... @@ -101,15 +101,11 @@ class _StoreBaseInfoPageSimState extends State<StoreBaseInfoPageSim> {
///从时间选择器中获取分钟数字符串 00 or 30
String _getMinuteStrFromPicker(List value) {
if (value[1] == 0) {
int? minute = SetTimeWidget.dateData[value[0]].values.last[value[1]];
if (minute == 0) {
return '00';
} else if (value[1] == 1) {
return '15';
}
if (value[1] == 2) {
return '30';
}
return '45';
return '${minute}';
}
@override
... ...
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);
});
}
... ...