setChannel method

  1. @visibleForTesting
void setChannel (
  1. MethodChannel newChannel
)
@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._handleTextInputInvocation);
    return true;
  }());
}