18 lines
387 B
Dart
18 lines
387 B
Dart
import './word_result.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);
|
|
}
|