fApp/lib/models/suggestion_model.dart
Flummi c35308fbc1
All checks were successful
Flutter Schmutter / build (push) Successful in 3m57s
v1.1.11+41
- fixed: duplicates on the frontpage
- new: search by tag
2025-06-10 08:39:55 +02:00

16 lines
399 B
Dart

class Suggestion {
final String tag;
final int tagged;
final double score;
Suggestion({required this.tag, required this.tagged, required this.score});
factory Suggestion.fromJson(Map<String, dynamic> json) {
return Suggestion(
tag: json['tag'].toString(),
tagged: int.tryParse(json['tagged'].toString()) ?? 0,
score: (json['score'] as num).toDouble(),
);
}
}