UserProfileQuery.fromJson constructor

UserProfileQuery.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory UserProfileQuery.fromJson(Map<String, dynamic> json) {
  if (json.containsKey('query') && json['query'] is Map) {
    return UserProfileQuery(Map<String, dynamic>.from(json['query'] as Map));
  }
  final rest = Map<String, dynamic>.from(json);
  rest.remove('id');
  rest.remove('src');
  return UserProfileQuery(rest);
}