18 lines
449 B
Dart
18 lines
449 B
Dart
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(),
|
|
);
|
|
}
|
|
}
|