isEnabled method

Future isEnabled()
override

Get the status of this sensor (enabled or not) NOTE: You need to set a method channel before using this method.

Implementation

Future<dynamic> isEnabled() async {
  if (_channel == null) {
    print("Please set a method channel before use the start method.");
    return null;
  }
  try {
    return await _channel?.invokeMethod('is_enable', null);
  } on PlatformException catch (e) {
    print(e.message);
  }
}