-
Notifications
You must be signed in to change notification settings - Fork 138
Added support for getting the current launcher app package #82
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -139,6 +139,14 @@ class DeviceApps { | |
| .catchError((dynamic err) => false); | ||
| } | ||
|
|
||
| /// Get the current Launcher app's package name | ||
| static Future<String?> getCurrentLauncherApp() { | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you rename the method to getCurrentDeviceLauncherApp? |
||
| return _methodChannel | ||
| .invokeMethod<String?>('getCurrentLauncherApp') | ||
| .then((String? value) => value) | ||
| .catchError((dynamic err) => null); | ||
| } | ||
|
|
||
| /// Listen to app changes: installations, uninstallations, updates, enabled or | ||
| /// disabled. As it is a [Stream], don't hesite to filter data if the content | ||
| /// is too verbose for you | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ResolveActivity may return null.
Could you handle this case please?