disconnect method

Future<bool> disconnect()

Disconnects the device (if connected).

The ConnectionEvent with type ConnectionType.disconnected is fired after the disconnection has taken place. Returns true if the disconnection was successfully made, false otherwise

Implementation

static Future<bool> disconnect() async {
  if (connected)
    return await _eSenseManagerMethodChannel.invokeMethod('disconnect');
  else
    return false;
}