getPublicGroupInfos method Null safety

Future<List<JMGroupInfo>> getPublicGroupInfos(
  1. {required String? appKey,
  2. required num? start,
  3. required num? count}
)

Implementation

Future<List<JMGroupInfo>> getPublicGroupInfos({
  required String? appKey,
  required num? start,
  required num? count,
}) async {
  List groupJsons = await _channel.invokeMethod(
      'getPublicGroupInfos',
      {'appKey': appKey, 'start': start, 'count': count}
        ..removeWhere((key, value) => value == null));
  List<JMGroupInfo> groups =
      groupJsons.map((json) => JMGroupInfo.fromJson(json)).toList();
  return groups;
}