removeFromFriendList method Null safety

Future<void> removeFromFriendList(
  1. {@required String? username,
  2. String? appKey}
)

Implementation

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

  return;
}