handleMessage method

Future<void> handleMessage(
  1. int messageId,
  2. String type,
  3. Uint8List data
)

Implementation

Future<void> handleMessage(int messageId, String type, Uint8List data) async {
  final handler = handlers[type] ?? handlers['*'];
  if (handler == null) {
    throw StateError('No handler registered for $type');
  }
  await handler(this, messageId, type, data);
}