D1APP-48 category model name changed
This commit is contained in:
parent
a0bb03f101
commit
a67e252667
|
|
@ -1,10 +1,10 @@
|
|||
class Category {
|
||||
class CategoryData {
|
||||
final int id;
|
||||
final String label;
|
||||
|
||||
const Category({required this.id, required this.label});
|
||||
const CategoryData({required this.id, required this.label});
|
||||
|
||||
factory Category.fromJson(Map<String, dynamic> json) => Category(
|
||||
factory CategoryData.fromJson(Map<String, dynamic> json) => CategoryData(
|
||||
id: json['id'],
|
||||
label: json['label'],
|
||||
);
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class RadarDetailsData {
|
|||
int comments;
|
||||
final List<Tag> tags;
|
||||
final List<Content> contents;
|
||||
final List<Category> categories;
|
||||
final List<CategoryData> categories;
|
||||
final int order;
|
||||
final List<OverviewData> relatedContents = [];
|
||||
|
||||
|
|
@ -54,9 +54,9 @@ class RadarDetailsData {
|
|||
(content) => Content.fromJson(content),
|
||||
),
|
||||
),
|
||||
categories: List<Category>.from(
|
||||
categories: List<CategoryData>.from(
|
||||
json['categories'].map(
|
||||
(cat) => Category.fromJson(cat),
|
||||
(cat) => CategoryData.fromJson(cat),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import 'category.dart';
|
|||
|
||||
class RadarOverviewData extends OverviewData {
|
||||
final bool forManagers;
|
||||
final List<Category> categories;
|
||||
final List<CategoryData> categories;
|
||||
final int timeToRead;
|
||||
int comments;
|
||||
bool marked;
|
||||
|
|
@ -40,9 +40,9 @@ class RadarOverviewData extends OverviewData {
|
|||
forManagers: json['forManagers'],
|
||||
marked: json['marked'],
|
||||
comments: json['comments'],
|
||||
categories: List<Category>.from(
|
||||
categories: List<CategoryData>.from(
|
||||
json['categories'].map(
|
||||
(category) => Category.fromJson(category),
|
||||
(category) => CategoryData.fromJson(category),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ class FloatingNavigationBar extends StatefulWidget {
|
|||
final int comments;
|
||||
final int id;
|
||||
final String title;
|
||||
final List<Category>? categories;
|
||||
final List<CategoryData>? categories;
|
||||
final void Function(bool value) onMarkChanged;
|
||||
|
||||
const FloatingNavigationBar({
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ class RadarOverview extends StatelessWidget {
|
|||
),
|
||||
const Spacer(),
|
||||
DidvanText(
|
||||
'${DateTimeUtils.momentGenerator(radar.createdAt)} | خواندن ${radar.timeToRead} دقیقه',
|
||||
'${DateTimeUtils.momentGenerator(radar.createdAt)} | خواندن در ${radar.timeToRead} دقیقه',
|
||||
style: Theme.of(context).textTheme.overline,
|
||||
color: Theme.of(context).colorScheme.caption,
|
||||
),
|
||||
|
|
|
|||
Loading…
Reference in New Issue