[flutter_tools] run web unit tests in sound null safety (#70799)
This commit is contained in:
@@ -121,8 +121,8 @@ class _PlatformBinaryMessenger extends BinaryMessenger {
|
||||
|
||||
/// Sends a platform message from the platform side back to the framework.
|
||||
@override
|
||||
Future<ByteData> send(String channel, ByteData? message) {
|
||||
final Completer<ByteData> completer = Completer<ByteData>();
|
||||
Future<ByteData?> send(String channel, ByteData? message) {
|
||||
final Completer<ByteData?> completer = Completer<ByteData?>();
|
||||
ui.window.onPlatformMessage!(channel, message, (ByteData? reply) {
|
||||
try {
|
||||
completer.complete(reply);
|
||||
|
||||
@@ -57,7 +57,7 @@ void main() {
|
||||
ServicesBinding.instance!.defaultBinaryMessenger
|
||||
.setMessageHandler('test_send', (ByteData? data) {
|
||||
loggedMessages.add(codec.decodeMessage(data) as String);
|
||||
return null;
|
||||
return Future<ByteData?>.value(null);
|
||||
});
|
||||
|
||||
await pluginBinaryMessenger.send(
|
||||
|
||||
Reference in New Issue
Block a user