resetUnreadCount method Null safety

Future resetUnreadCount(
  1. {String? inboxType}
)

Resets unread count of inboxType.

Implementation

static Future resetUnreadCount({String? inboxType}) async {
  LCUser? user = await LCUser.getCurrent();
  if (user == null) {
    throw ArgumentError.notNull('current user');
  }

  Map<String, dynamic> params = {
    OwnerKey: jsonEncode(_LCEncoder.encode(user))
  };
  if (!isNullOrEmpty(inboxType)) {
    params[InboxTypeKey] = inboxType;
  }
  await LeanCloud._httpClient
      .post('subscribe/statuses/resetUnreadCount', queryParams: params);
}