setMockMessageHandler method

  1. @Deprecated('Use tester.binding.defaultBinaryMessenger.setMockMessageHandler or ' 'TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger.setMockMessageHandler instead. ' 'For the first argument, pass channel.name. ' 'This feature was deprecated after v3.9.0-19.0.pre.')
void setMockMessageHandler(
  1. String channel,
  2. MessageHandler? handler
)

Shim for TestDefaultBinaryMessenger.setMockMessageHandler.

Implementation

@Deprecated(
  'Use tester.binding.defaultBinaryMessenger.setMockMessageHandler or '
  'TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger.setMockMessageHandler instead. '
  'For the first argument, pass channel.name. '
  'This feature was deprecated after v3.9.0-19.0.pre.'
)
void setMockMessageHandler(String channel, MessageHandler? handler) {
  TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger.setMockMessageHandler(channel, handler);
}