Jisho-Study-Tool/lib/models/history/word_query.dart

17 lines
358 B
Dart

class WordQuery {
final String query;
// TODO: Link query with results that the user clicks onto.
// final List<WordResult> chosenResults;
WordQuery({
required this.query,
});
Map<String, Object?> toJson() => {'query': query};
factory WordQuery.fromJson(Map<String, dynamic> json) =>
WordQuery(query: json['query'] as String);
}