setChannel method Null safety

  1. @visibleForTesting
void setChannel(
  1. MethodChannel newChannel
)
visibleForTesting">@visibleForTesting

Set the MethodChannel used to communicate with the system's text input control.

This is only meant for testing within the Flutter SDK. Changing this will break the ability to input text. This has no effect if asserts are disabled.

Implementation

@visibleForTesting
static void setChannel(MethodChannel newChannel) {
  assert(() {
    _instance._channel = newChannel..setMethodCallHandler(_instance._loudlyHandleTextInputInvocation);
    return true;
  }());
}