start method
Start this sensor NOTE: You need to set a method channel before using this method.
Implementation
Future<Null> start() async {
if (_channel == null) {
print("Please set a method channel before use the start method.");
return null;
}
try {
if (config == null) {
await _channel?.invokeMethod('start', null);
} else {
await _channel?.invokeMethod('start', config?.toMap());
}
} on PlatformException catch (e) {
print(e.message);
}
}