Send a null response to signal that a message is not implemented on the web text input channel (flutter/engine#25314)

This commit is contained in:
Jason Simmons 2021-03-31 15:14:01 -07:00 committed by GitHub
parent e8d07d0157
commit 9db82f38da

View File

@ -1373,9 +1373,13 @@ class TextEditingChannel {
// UITextInput.firstRecForRange.
break;
case 'TextInput.setCaretRect':
// No-op: not supported on this platform.
break;
default:
throw StateError(
'Unsupported method call on the flutter/textinput channel: ${call.method}');
EnginePlatformDispatcher.instance._replyToPlatformMessage(callback, null);
return;
}
EnginePlatformDispatcher.instance
._replyToPlatformMessage(callback, codec.encodeSuccessEnvelope(true));