Skip to content

Commit

Permalink
Add return statement to method call handler.
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldemarco committed Mar 31, 2020
1 parent 419c17b commit ce9bcd2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/src/flutter_blue.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class FlutterBlue {
FlutterBlue._() {
_channel.setMethodCallHandler((MethodCall call) {
_methodStreamController.add(call);
return;
});

// Send the log level to the underlying platforms.
Expand Down Expand Up @@ -102,7 +103,9 @@ class FlutterBlue {
throw e;
}

yield* FlutterBlue.instance._methodStream.where((m) => m.method == "ScanResult").map((m) => m.arguments)
yield* FlutterBlue.instance._methodStream
.where((m) => m.method == "ScanResult")
.map((m) => m.arguments)
.takeUntil(Rx.merge(killStreams))
.doOnDone(stopScan)
.map((buffer) => new protos.ScanResult.fromBuffer(buffer))
Expand Down

0 comments on commit ce9bcd2

Please sign in to comment.