mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Turn implicit casts in code generated by flutter_platform.dart
into explicit casts. (#56290)
This commit is contained in:
parent
58b10d6c51
commit
0830c75c59
@ -200,9 +200,10 @@ void catchIsolateErrors() {
|
||||
errorPort.listen((dynamic message) {
|
||||
// Masquerade as an IsolateSpawnException because that's what this would
|
||||
// be if the error had been detected statically.
|
||||
final IsolateSpawnException error = IsolateSpawnException(message[0]);
|
||||
final Trace stackTrace =
|
||||
message[1] == null ? Trace(const <Frame>[]) : Trace.parse(message[1]);
|
||||
final IsolateSpawnException error = IsolateSpawnException(
|
||||
message[0] as String);
|
||||
final Trace stackTrace = message[1] == null ?
|
||||
Trace(const <Frame>[]) : Trace.parse(message[1] as String);
|
||||
Zone.current.handleUncaughtError(error, stackTrace);
|
||||
});
|
||||
}
|
||||
@ -230,8 +231,7 @@ void main() {
|
||||
});
|
||||
WebSocket.connect(server).then((WebSocket socket) {
|
||||
socket.map((dynamic x) {
|
||||
assert(x is String);
|
||||
return json.decode(x);
|
||||
return json.decode(x as String);
|
||||
}).pipe(channel.sink);
|
||||
socket.addStream(channel.stream.map(json.encode));
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user