downloadOriginalUserAvatar method Null safety

Future<Map> downloadOriginalUserAvatar(
  1. {required String? username,
  2. String? appKey}
)

Implementation

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

  return {
    'username': resJson['username'],
    'appKey': resJson['appKey'],
    'filePath': resJson['filePath']
  };
}