isConnectedToBluetooth function

Future<bool> isConnectedToBluetooth()

returns true if connected to bluetooth

Implementation

Future<bool> isConnectedToBluetooth() async {
  var connectivityResult = await Connectivity().checkConnectivity();
  return connectivityResult.contains(ConnectivityResult.bluetooth);
}