addGroupMembers method Null safety

Future<void> addGroupMembers(
  1. {required String? id,
  2. required List<String>? usernameArray,
  3. String? appKey}
)

Implementation

Future<void> addGroupMembers({
  required String? id,
  required List<String>? usernameArray,
  String? appKey,
}) async {
  await _channel.invokeMethod(
      'addGroupMembers',
      {
        'id': id,
        'usernameArray': usernameArray,
        'appKey': appKey,
      }..removeWhere((key, value) => value == null));

  return;
}