sendMessage method

  1. @override
Future<String?> sendMessage(
  1. String recipientAddress,
  2. dynamic message,
  3. String authorityId,
  4. String typeId,
  5. int versionMajor,
)
override

Implementation

@override
Future<String?> sendMessage(String recipientAddress, dynamic message, String authorityId, String typeId, int versionMajor) async {
  if (message is! Map<String, dynamic>) {
    throw const FormatException('Message must be a Map with content and parameters');
  }

  final result = await methodChannel.invokeMethod<String>('sendMessage', {
    'recipientAddress': recipientAddress,
    'message': message,
    'authorityId': authorityId,
    'typeId': typeId,
    'versionMajor': versionMajor,
  });
  return result;
}