-
Notifications
You must be signed in to change notification settings - Fork 316
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
54 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v1.3.7 | ||
v1.3.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/// 自动全屏 | ||
import 'dart:io'; | ||
|
||
import 'package:flutter/material.dart'; | ||
|
||
import '../basic/commons.dart'; | ||
import '../basic/methods.dart'; | ||
|
||
const _propertyName = "noAnimation"; | ||
late bool _noAnimation; | ||
|
||
Future<void> initNoAnimation() async { | ||
_noAnimation = | ||
(await methods.loadProperty(_propertyName)) == "true"; | ||
} | ||
|
||
bool currentNoAnimation() { | ||
return _noAnimation; | ||
} | ||
|
||
Future<void> _chooseNoAnimation(BuildContext context) async { | ||
String? result = await chooseListDialog<String>(context, | ||
title: "取消键盘或音量翻页动画", values: ["是", "否"]); | ||
if (result != null) { | ||
var target = result == "是"; | ||
await methods.saveProperty(_propertyName, "$target"); | ||
_noAnimation = target; | ||
} | ||
} | ||
|
||
Widget noAnimationSetting() { | ||
return StatefulBuilder( | ||
builder: (BuildContext context, void Function(void Function()) setState) { | ||
return ListTile( | ||
title: const Text("取消键盘或音量翻页动画"), | ||
subtitle: Text(_noAnimation ? "是" : "否"), | ||
onTap: () async { | ||
await _chooseNoAnimation(context); | ||
setState(() {}); | ||
}, | ||
); | ||
}, | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters