|
WsZ21Service(String domain) { |
|
_channel = WebSocketChannel.connect(Uri.parse('ws://$domain/roco/z21/')); |
|
_channel.ready.then( |
|
(_) => lanSetBroadcastFlags( |
|
BroadcastFlags.fromList([ |
|
BroadcastFlag.DrivingSwitching, |
|
BroadcastFlag.RBus, |
|
BroadcastFlag.LocoNet, |
|
BroadcastFlag.LocoNetDetector, |
|
]), |
|
), |
|
); |
|
_stream = _channel.stream |
|
.asBroadcastStream() |
|
.cast<Uint8List>() |
|
.map(Z21Service.convert); |
|
} |
.ready.then can throw here and at this point this particular Future is fire-and-forget and lives outside of Riverpod's error handling...
Frontend/lib/service/roco/ws_z21_service.dart
Lines 25 to 41 in 3bce612
.ready.thencan throw here and at this point this particular Future is fire-and-forget and lives outside of Riverpod's error handling...