setDeviceStateListener method

  1. @override
Stream<List<MoveDevice>> setDeviceStateListener()
override

Device state fired on device connection change.

Implementation

@override
Stream<List<MoveDevice>> setDeviceStateListener() async* {
  yield* deviceStateChannel
      .receiveBroadcastStream()
      .asyncMap<List<MoveDevice>>((results) {
    var moveScanResults = MoveDevice.fromNative(results);
    return moveScanResults;
  });
}