Files
hlaskovnik-reimagined/frontend/lib/model/quote.dart
T
2026-04-03 13:01:22 +02:00

26 lines
423 B
Dart

// quote model class
class Quote{
final int id;
final String author;
final String body;
const Quote({
required this.id,
required this.author,
required this.body,
});
factory Quote.fromJson(Map<String, dynamic> json) {
return Quote(
id: json['id'],
author: json['author'],
body: json['body'],
);
}
@override
String toString() {
return "$body - $author";
}
}