DashboardDetails.fromJson constructor

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

Implementation

factory DashboardDetails.fromJson(Map<String, Object?> json) {
  return DashboardDetails(
    description: json[r'description'] as String?,
    editPermissions: (json[r'editPermissions'] as List<Object?>?)
            ?.map((i) => SharePermission.fromJson(
                i as Map<String, Object?>? ?? const {}))
            .toList() ??
        [],
    name: json[r'name'] as String? ?? '',
    sharePermissions: (json[r'sharePermissions'] as List<Object?>?)
            ?.map((i) => SharePermission.fromJson(
                i as Map<String, Object?>? ?? const {}))
            .toList() ??
        [],
  );
}