50 lines
1.3 KiB
Dart
50 lines
1.3 KiB
Dart
import 'package:didvan/models/item_overview.dart';
|
|
|
|
import 'category.dart';
|
|
|
|
class RadarOverviewData extends OverviewData {
|
|
final bool forManagers;
|
|
final List<CategoryData> categories;
|
|
final int timeToRead;
|
|
int comments;
|
|
bool marked;
|
|
|
|
RadarOverviewData({
|
|
required this.forManagers,
|
|
required this.categories,
|
|
required this.comments,
|
|
required this.timeToRead,
|
|
required this.marked,
|
|
required createdAt,
|
|
required description,
|
|
required id,
|
|
required image,
|
|
required title,
|
|
}) : super(
|
|
createdAt: createdAt,
|
|
description: description,
|
|
id: id,
|
|
image: image,
|
|
title: title,
|
|
type: 'radar',
|
|
);
|
|
|
|
factory RadarOverviewData.fromJson(Map<String, dynamic> json) =>
|
|
RadarOverviewData(
|
|
id: json['id'],
|
|
image: json['image'],
|
|
title: json['title'],
|
|
description: json['description'],
|
|
timeToRead: json['timeToRead'],
|
|
createdAt: json['createdAt'],
|
|
forManagers: json['forManagers'],
|
|
marked: json['marked'],
|
|
comments: json['comments'],
|
|
categories: List<CategoryData>.from(
|
|
json['categories'].map(
|
|
(category) => CategoryData.fromJson(category),
|
|
),
|
|
),
|
|
);
|
|
}
|