UserDetails.fromJson constructor Null safety

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

Implementation

UserDetails.fromJson(Map<String, dynamic> json) {
  result = json['result'] ?? '';
  if (result == 'ok') {
    response = json['response'] ?? '';
    data = Data.fromjson(json['data']!);
  } else {
    throw MangadexServerException(json);
  }
}