getMessage method Null safety

Future<BaseMessage> getMessage(
  1. MessageRetrievalParams params
)

Retrieves a BaseMessage with given MessageRetrievalParams.

Implementation

static Future<BaseMessage> getMessage(MessageRetrievalParams params) async {
  if (params.messageId < 0) {
    throw InvalidParameterError();
  }

  final sdk = SendbirdSdk().getInternal();
  return sdk.api.getMessage(
    channelType: params.channelType,
    channelUrl: params.channelUrl,
    messageId: params.messageId,
    params: params,
  );
}