mirror of
https://github.com/hackku21/nearby_connections.git
synced 2026-03-02 03:49:22 +00:00
updated nearby to version 17.0.0, added location enabling and checking utility method, version 1.1.0 published
This commit is contained in:
@@ -163,9 +163,22 @@ class Nearby {
|
||||
///
|
||||
/// retruns true/false based on external storage permissions.
|
||||
Future<bool> checkExternalStoragePermission() async =>
|
||||
await _channel.invokeMethod(
|
||||
'checkExternalStoragePermission',
|
||||
);
|
||||
await _channel.invokeMethod('checkExternalStoragePermission');
|
||||
|
||||
/// Convinience method
|
||||
///
|
||||
/// Checks if Location/GPS is enabled
|
||||
///
|
||||
/// If Location isn't enabled, devices may disconnect often.
|
||||
/// Some devices may immediately disconnect
|
||||
Future<bool> checkLocationEnabled() async =>
|
||||
await _channel.invokeMethod('checkLocationEnabled');
|
||||
|
||||
/// Convinience method
|
||||
///
|
||||
/// directs user to Location Settings, so they can turn on their Location/GPS
|
||||
void enableLocationServices() =>
|
||||
_channel.invokeMethod('enableLocationServices');
|
||||
|
||||
/// Convinience method
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user