Systemrole.fromJson constructor

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

Implementation

factory Systemrole.fromJson(Map<String, dynamic> json) {
  return Systemrole(
    id: json['Id'],
    name: json['Name'],
    dateAdd: json['dateadd'] != null && json['dateadd'] != ""
        ? DateTime.tryParse(json['dateadd'])
        : null,
    dateEdit: json['dateedit'] != null && json['dateedit'] != ""
        ? DateTime.tryParse(json['dateedit'])
        : null,
    userAdd: json['useradd'],
    userEdit: json['useredit'],
  );
}