Users.fromJson constructor

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

Implementation

Users.fromJson(Map<String, dynamic> json) {
  id = json['id'];
  createdAt = json['createdAt'];
  email = json['email'];
  passwordChangedAt = json['passwordChangedAt'];
  isGuest = json['isGuest'];
  isTest = json['isTest'];
  type = json['type'];
  detail = json['detail'] != null ? Detail.fromJson(json['detail']) : null;
  if (json['roles'] != null) {
    roles = <RoleDTO>[];
    json['roles'].forEach((v) {
      roles!.add(RoleDTO.fromJson(v));
    });
  }
}