Skip to content

Commit 29002ec

Browse files
committed
bugfix & added launcher selector
1 parent 9e7f032 commit 29002ec

6 files changed

Lines changed: 40 additions & 11 deletions

File tree

android/app/build.gradle

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,8 @@ android {
6262

6363
buildTypes {
6464
release {
65-
// TODO: Add your own signing config for the release build.
66-
// Signing with the debug keys for now, so `flutter run --release` works.
67-
//signingConfig signingConfigs.debug
68-
signingConfig signingConfigs.release
65+
signingConfig signingConfigs.debug
66+
//signingConfig signingConfigs.release
6967
}
7068
}
7169
}

android/key.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
storePassword=password
2+
keyPassword=password
3+
keyAlias=android
4+
storeFile=/Users/shouvikbasu/Downloads/android-new-release-key.keystore

lib/activities/preferences.dart

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import 'package:android_intent/android_intent.dart';
12
import 'package:flutter/material.dart';
23

34
import 'package:flutter_mobx/flutter_mobx.dart';
@@ -14,6 +15,14 @@ final TaskList tasklist = StoreBuilder.tasks();
1415
class Preferences extends StatelessWidget {
1516
@override
1617
Widget build(BuildContext context) {
18+
// ignore: non_constant_identifier_names
19+
final int FLAGACTIVITYNEWTASK = 268435456;
20+
AndroidIntent launcherIntent = AndroidIntent(
21+
action: 'android.intent.action.MAIN',
22+
category: 'android.intent.category.HOME',
23+
flags: [FLAGACTIVITYNEWTASK],
24+
);
25+
1726
return Scaffold(
1827
appBar: AppBar(
1928
title: Text('Preferences'),
@@ -52,7 +61,10 @@ class Preferences extends StatelessWidget {
5261
},
5362
),
5463
ListTile(
55-
title: Text('Select Another Launcher'),
64+
title: Text('Select Launcher'),
65+
onTap: () async => {
66+
await launcherIntent.launch(),
67+
},
5668
)
5769
],
5870
),

lib/widgets/launcher/apps_search.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class _AppsSearchState extends State<AppsSearchWidget> {
5353
color: themeColor,
5454
decoration: TextDecoration.none,
5555
),
56-
autofocus: false,
56+
autofocus: true,
5757
decoration: InputDecoration(
5858
border: OutlineInputBorder(
5959
borderSide: new BorderSide(color: highlightColor),

pubspec.lock

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ packages:
2222
url: "https://pub.dartlang.org"
2323
source: hosted
2424
version: "0.39.11"
25+
android_intent:
26+
dependency: "direct main"
27+
description:
28+
name: android_intent
29+
url: "https://pub.dartlang.org"
30+
source: hosted
31+
version: "0.3.7+3"
2532
args:
2633
dependency: transitive
2734
description:
@@ -380,6 +387,13 @@ packages:
380387
url: "https://pub.dartlang.org"
381388
source: hosted
382389
version: "2.4.0"
390+
platform:
391+
dependency: transitive
392+
description:
393+
name: platform
394+
url: "https://pub.dartlang.org"
395+
source: hosted
396+
version: "2.2.1"
383397
pool:
384398
dependency: transitive
385399
description:

pubspec.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,20 @@ description: A No-Distraction Android Launcher.
33

44
publish_to: "none"
55

6-
version: 1.0.5+5
6+
version: 1.1.6+6
77

88
environment:
99
sdk: ">=2.7.0 <3.0.0"
1010

1111
dependencies:
12-
device_apps: ^1.0.9
13-
shared_preferences: ">=0.5.7+3 <2.0.0"
14-
alphabet_list_scroll_view: ^1.0.6
1512
mobx: ^0.3.8
13+
device_apps: ^1.0.9
1614
flutter_mobx: ^0.3.3
1715
flutter_svg: ^0.17.1
18-
flutter_slidable: "^0.5.4"
16+
android_intent: ^0.3.7+3
17+
flutter_slidable: ^0.5.4
18+
alphabet_list_scroll_view: ^1.0.6
19+
shared_preferences: ">=0.5.7+3 <2.0.0"
1920
flutter:
2021
sdk: flutter
2122

0 commit comments

Comments
 (0)