Remove redundant property from ExampleResults

This commit is contained in:
Oystein Kristoffer Tveit 2020-06-30 12:51:45 +02:00
parent 5ae14e60b7
commit 1317402894
3 changed files with 4 additions and 7 deletions

View File

@ -2,6 +2,7 @@
- Export object interfaces for both libraries - Export object interfaces for both libraries
- Add documentation for object interfaces - Add documentation for object interfaces
- Remove accidental redundant property "phrase" from ExampleResults
## 1.0.2 ## 1.0.2

View File

@ -120,7 +120,6 @@ ExampleResults parseExamplePageData(String pageHtml, String phrase) {
query: phrase, query: phrase,
found: results.isNotEmpty, found: results.isNotEmpty,
results: results ?? [], results: results ?? [],
uri: uriForExampleSearch(phrase), uri: uriForExampleSearch(phrase)
phrase: phrase,
); );
} }

View File

@ -154,18 +154,15 @@ class ExampleResults {
String uri; String uri;
/// The examples that were found, if any. /// The examples that were found, if any.
List<ExampleResultData> results; List<ExampleResultData> results;
String phrase;
ExampleResults({this.query, this.found, this.results, this.uri, this.phrase}); ExampleResults({this.query, this.found, this.results, this.uri});
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
return { return {
'query': query, 'query': query,
'found': found, 'found': found,
'results': results, 'results': results,
'uri': uri, 'uri': uri
'phrase': phrase
}; };
} }
} }