TicketDTO.fromJson constructor
TicketDTO.fromJson(
- Map<String, dynamic> json
)
Implementation
TicketDTO.fromJson(Map<String, dynamic> json) : super.fromJson(json) {
title = json['title'];
status = json['status'];
code = json['code'];
delegatedTo = json['delegatedTo'];
if (json['items'] != null) {
items = <Items>[];
json['items'].forEach((v) {
items!.add(Items.fromJson(v));
});
}
if (json['assignedUsers'] != null) {
assignedUsers = <User>[];
json['assignedUsers'].forEach((v) {
assignedUsers!.add(User.fromJson(v));
});
}
createdUser =
json['createdUser'] != null ? User.fromJson(json['createdUser']) : null;
category =
json['category'] != null ? Category.fromJson(json['category']) : null;
store = json['store'] != null ? StoreDTO.fromJson(json['store']) : null;
}