getNoPushGroupsFromCache method Null safety

Future<List<String>> getNoPushGroupsFromCache()

Gets the list of groups which have blocked the push notification.

return The list of groups that blocked the push notification.

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

Implementation

Future<List<String>> getNoPushGroupsFromCache() async {
  Map result = await _channel.invokeMethod(ChatMethodKeys.getNoPushGroups);
  List<String> list = [];
  if (result.containsKey(ChatMethodKeys.getNoPushGroups)) {
    list = result[ChatMethodKeys.getNoPushGroups]?.cast<String>();
  }
  return list;
}