fromJson static method

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

Implementation

static Catalog fromJson(Map<String, dynamic> json) => Catalog(
      catalogId: (json['catalogId'] as num?)?.toInt(),
      name: json['name'],
      published: json['published'],
      sortOrder: (json['sortOrder'] as num?)?.toInt(),
      categoryId: (json['categoryId'] as num?)?.toInt(),
      categoryImage: json['categoryImage'],
      categoryName: json['categoryName'],
      id: json['id'],
      created:
          json['created'] != null ? DateTime.parse(json['created']) : null,
      creator: json['creator'],
      updated:
          json['updated'] != null ? DateTime.parse(json['updated']) : null,
      updater: json['updater'],
    );