Profile.fromJson constructor

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

Parses profile JSON returned from authenticated profile queries.

Implementation

Profile.fromJson(Map<String, dynamic> json)
    : _id = json['id'],
      _name = json['name'],
      _textures = null,
      _signatures = null {
  if (json['capes'] is List<dynamic>) {
    _capes = json['capes'];
  } else {
    _capes = List.empty();
  }
  if (json['skins'] is List<dynamic>) {
    _skins = json['skins'];
  } else {
    _skins = List.empty();
  }
}