setGroupNickname method Null safety

Future<void> setGroupNickname(
  1. {required String? groupId,
  2. required String? nickName,
  3. required String? username,
  4. String? appKey}
)

Implementation

Future<void> setGroupNickname({
  required String? groupId,
  required String? nickName,
  required String? username,
  String? appKey,
}) async {
  await _channel.invokeMethod(
      'setGroupNickname',
      {
        'groupId': groupId,
        'nickName': nickName,
        'username': username,
        'appKey': appKey,
      }..removeWhere((key, value) => value == null));

  return;
}