mirror of
https://github.com/hackku21/nearby_connections.git
synced 2024-10-27 19:14:01 +00:00
18 lines
433 B
Dart
18 lines
433 B
Dart
import 'dart:async';
|
|
|
|
import 'package:flutter/services.dart';
|
|
|
|
class Nearby {
|
|
//for maintaining only 1 instance of this class
|
|
static final Nearby _instance = Nearby._();
|
|
static Nearby get instance => _instance;
|
|
Nearby._();
|
|
|
|
static const MethodChannel _channel =
|
|
const MethodChannel('nearby_connections');
|
|
|
|
Future<bool> checkPermissions() async => await _channel.invokeMethod(
|
|
'checkPermissions',
|
|
);
|
|
}
|