disableOfflinePush method Null safety

Future<void> disableOfflinePush(
  1. {required int start,
  2. required int end}
)

Do not push the offline messages within the specified time period (24-hour clock).

Param start The start hour(24-hour clock).

Param end The end hour(24-hour clock).

Throws A description of the issue that caused this exception. See {@link EMError}

Implementation

Future<void> disableOfflinePush({
  required int start,
  required int end,
}) async {
  Map req = {'start': start, 'end': end};
  Map result =
      await _channel.invokeMethod(ChatMethodKeys.disableOfflinePush, req);
  try {
    EMError.hasErrorFromResult(result);
  } on EMError catch (e) {
    throw e;
  }
}