PageOfDashboards.fromJson constructor

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

Implementation

factory PageOfDashboards.fromJson(Map<String, Object?> json) {
  return PageOfDashboards(
    dashboards: (json[r'dashboards'] as List<Object?>?)
            ?.map((i) =>
                Dashboard.fromJson(i as Map<String, Object?>? ?? const {}))
            .toList() ??
        [],
    maxResults: (json[r'maxResults'] as num?)?.toInt(),
    next: json[r'next'] as String?,
    prev: json[r'prev'] as String?,
    startAt: (json[r'startAt'] as num?)?.toInt(),
    total: (json[r'total'] as num?)?.toInt(),
  );
}