hyzp_ybqx-Commit130:修正更改定时间隔失败问题
This commit is contained in:
@@ -1 +1 @@
|
|||||||
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":20220408,"versionName":"1.4.23","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
|
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":20220426,"versionName":"1.4.26","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
|
||||||
@@ -38,7 +38,8 @@ class _LoginPageState extends State<page7_setRemind> {
|
|||||||
////////
|
////////
|
||||||
static onNullFun() {}
|
static onNullFun() {}
|
||||||
|
|
||||||
Widget _getListTile(title, {
|
Widget _getListTile(
|
||||||
|
title, {
|
||||||
String leadPath = '',
|
String leadPath = '',
|
||||||
Color leadColor,
|
Color leadColor,
|
||||||
Color textColor,
|
Color textColor,
|
||||||
@@ -121,9 +122,7 @@ class _LoginPageState extends State<page7_setRemind> {
|
|||||||
text: remindGap.toString(),
|
text: remindGap.toString(),
|
||||||
// 保持光标在最后
|
// 保持光标在最后
|
||||||
selection: TextSelection.fromPosition(TextPosition(
|
selection: TextSelection.fromPosition(TextPosition(
|
||||||
affinity: TextAffinity.downstream, offset: remindGap
|
affinity: TextAffinity.downstream, offset: remindGap.toString().length)))),
|
||||||
.toString()
|
|
||||||
.length)))),
|
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
keyboardType: TextInputType.number,
|
keyboardType: TextInputType.number,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
@@ -136,7 +135,10 @@ class _LoginPageState extends State<page7_setRemind> {
|
|||||||
enabledBorder: UnderlineInputBorder(borderSide: BorderSide(color: Colors.lightBlue)),
|
enabledBorder: UnderlineInputBorder(borderSide: BorderSide(color: Colors.lightBlue)),
|
||||||
),
|
),
|
||||||
onChanged: (v) {
|
onChanged: (v) {
|
||||||
|
int n = int.parse(v);
|
||||||
|
if (n > 10 && n < 36000) {
|
||||||
remindGap = int.parse(v);
|
remindGap = int.parse(v);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -240,6 +242,7 @@ class _LoginPageState extends State<page7_setRemind> {
|
|||||||
text: "确认",
|
text: "确认",
|
||||||
color: Colors.blueAccent,
|
color: Colors.blueAccent,
|
||||||
onTop: () async {
|
onTop: () async {
|
||||||
|
print("g_remindGap = $g_remindGap, remindGap = $remindGap");
|
||||||
if (g_bVoiceRemind != bVoiceRemind || g_remindGap != remindGap) {
|
if (g_bVoiceRemind != bVoiceRemind || g_remindGap != remindGap) {
|
||||||
var isRuning = await FlutterBackgroundService().isServiceRunning();
|
var isRuning = await FlutterBackgroundService().isServiceRunning();
|
||||||
print("isRuning = $isRuning");
|
print("isRuning = $isRuning");
|
||||||
@@ -256,11 +259,11 @@ class _LoginPageState extends State<page7_setRemind> {
|
|||||||
await Storage.setInt('nRemindGap', g_remindGap);
|
await Storage.setInt('nRemindGap', g_remindGap);
|
||||||
|
|
||||||
if (bVoiceRemind) {
|
if (bVoiceRemind) {
|
||||||
var isRunning = await FlutterBackgroundService().isServiceRunning();
|
Future.delayed(Duration(seconds: 2), (){
|
||||||
if (!isRunning) {
|
print('延时2s执行');
|
||||||
await FlutterBackgroundService.initialize(onStart);
|
FlutterBackgroundService.initialize(onStart);
|
||||||
doRemind();
|
doRemind();
|
||||||
}
|
});
|
||||||
} else {
|
} else {
|
||||||
myPlayClick();
|
myPlayClick();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,13 @@ packages:
|
|||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.1"
|
version: "1.0.1"
|
||||||
|
android_power_manager:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: android_power_manager
|
||||||
|
url: "https://pub.flutter-io.cn"
|
||||||
|
source: hosted
|
||||||
|
version: "0.1.6"
|
||||||
app_installer:
|
app_installer:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|||||||
Reference in New Issue
Block a user