Skip to content

Commit

Permalink
优化交互体验
Browse files Browse the repository at this point in the history
  • Loading branch information
qiuxiang committed Sep 21, 2020
1 parent 7150f55 commit a85f390
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# 简单应用启动器

为了在 MIUI 超级省电模式下打开其他应用[[下载]](https://github.com/qiuxiang/flutter-launcher/releases)
为了在超级省电模式下打开其他应用[[下载]](https://github.com/qiuxiang/flutter-launcher/releases)
11 changes: 4 additions & 7 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ class _HomePageState extends State<HomePage> {

DeviceApps.getInstalledApplications(includeSystemApps: true)
.then((apps) => setState(() => _apps = apps));

DeviceApps.getInstalledApplications(
includeSystemApps: true,
includeAppIcons: true,
).then((apps) => setState(() => _apps = apps));
}

_onSelected(PopupMenu value) {
Expand Down Expand Up @@ -71,8 +66,10 @@ class _HomePageState extends State<HomePage> {
child: Row(children: [
Checkbox(
value: _includeSystemApps,
onChanged: (value) =>
setState(() => _includeSystemApps = value),
onChanged: (value) {
setState(() => _includeSystemApps = value);
Navigator.of(context).pop();
},
),
const Text('System Apps'),
]),
Expand Down

0 comments on commit a85f390

Please sign in to comment.