getDevicesStream method
Implementation
@override
Stream<List<MinewBeaconDevice>> getDevicesStream() {
return scanDevicesEventChannel.receiveBroadcastStream().map((event) {
try {
final data = (event as List<Object?>)
.map((e) => MinewBeaconDevice.fromMap(e))
.toList();
return data;
} catch (e) {
if (kDebugMode) {
print(e);
}
return [];
}
});
}