setMockMessageHandler method

  1. @Deprecated('Use tester.binding.defaultBinaryMessenger.setMockDecodedMessageHandler or ' 'TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger.setMockDecodedMessageHandler instead. ' 'Pass the channel as the first argument. ' 'This feature was deprecated after v3.9.0-19.0.pre.')
void setMockMessageHandler(
  1. Future<T> handler(
    1. T? message
    )?
)

Shim for TestDefaultBinaryMessenger.setMockDecodedMessageHandler.

Implementation

@Deprecated(
  'Use tester.binding.defaultBinaryMessenger.setMockDecodedMessageHandler or '
  'TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger.setMockDecodedMessageHandler instead. '
  'Pass the channel as the first argument. '
  'This feature was deprecated after v3.9.0-19.0.pre.'
)
void setMockMessageHandler(Future<T> Function(T? message)? handler) {
  TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger.setMockDecodedMessageHandler<T>(this, handler);
}