Page.fromJson constructor

Page.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory Page.fromJson(Map<String, Object?> json) => Page(
      number: json["number"] == null ? null : (json["number"] as num).toInt(),
      size: json["size"] == null ? null : (json["size"] as num).toInt(),
      prices: json["prices"] == null
          ? null
          : (json["prices"] as List)
              .map(
                (item) => Catalog.fromJson(
                  (item as Map).cast<String, Object?>(),
                ),
              )
              .toList(),
    );