Skip to content

Commit

Permalink
Merge pull request spencerccf#64 from spencerccf/adding-missing-code-…
Browse files Browse the repository at this point in the history
…for-NFC-pull-request

Adding in remaining NFC items to open NFC Settings on Android
  • Loading branch information
spencerccf authored Jul 28, 2020
2 parents afc997a + b7738e6 commit 693a580
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,12 @@ class _MyAppState extends State<MyApp> {
AppSettings.openBatteryOptimizationSettings();
},
),
RaisedButton(
child: Text("NFC"),
onPressed: () {
AppSettings.openNFCSettings();
},
),
]);

return actionItems;
Expand Down
5 changes: 5 additions & 0 deletions lib/app_settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,9 @@ class AppSettings {
static Future<void> openAppSettings() async {
_channel.invokeMethod('app_settings');
}

/// Future async method call to open NCF settings.
static Future<void> openNFCSettings() async {
_channel.invokeMethod('nfc');
}
}

0 comments on commit 693a580

Please sign in to comment.