TestMethodChannelExtension extension Null safety

Shim to support the obsolete setMockMethodCallHandler and checkMockMethodCallHandler methods on MethodChannel in tests.

The implementations defer to TestDefaultBinaryMessengerBinding.defaultBinaryMessenger.

Rather than calling setMockMethodCallHandler on the method channel, use tester.binding.defaultBinaryMessenger.setMockMethodCallHandler directly. This more accurately represents the actual method invocation.

on

Methods

checkMockMethodCallHandler(Object? handler) bool
Shim for TestDefaultBinaryMessenger.checkMockMessageHandler.
setMockMethodCallHandler(Future? handler(MethodCall call)?) → void
Shim for TestDefaultBinaryMessenger.setMockMethodCallHandler.