This commit is contained in:
17
lib/models/feed.dart
Normal file
17
lib/models/feed.dart
Normal file
@ -0,0 +1,17 @@
|
||||
import 'package:f0ckapp/models/item.dart';
|
||||
|
||||
class Feed {
|
||||
final bool atEnd;
|
||||
final bool atStart;
|
||||
final List<MediaItem> items;
|
||||
|
||||
Feed({required this.atEnd, required this.atStart, required this.items});
|
||||
|
||||
factory Feed.fromJson(Map<String, dynamic> json) {
|
||||
return Feed(
|
||||
atEnd: json['atEnd'] ?? false,
|
||||
atStart: json['atStart'] ?? false,
|
||||
items: (json['items'] as List).map((e) => MediaItem.fromJson(e)).toList(),
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user