setChannel static method

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

Set the MethodChannel used to communicate with the system's undo manager.

This is only meant for testing within the Flutter SDK. Changing this will break the ability to set the undo status or receive undo and redo events from the system. This has no effect if asserts are disabled.

Implementation

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