kingwill101 / duckduckgo_search

Search using the DuckDuckGo api
https://pub.dev/packages/duckduckgo_search
MIT License
4 stars 1 forks source link

Type cast error on answers #1

Closed phantomate closed 1 month ago

phantomate commented 1 month ago

Hi @kingwill101.

thank you for you package and the port of duckduckgo search. Unfortunately I receive following error:

Unhandled Exception: type 'String' is not a subtype of type 'num?' in type cast _$AnswerFromJson (package:duckduckgo_search/src/models/answer.g.dart:22:41) new Answer.fromJson (package:duckduckgo_search/src/models/answer.dart:74:57) DuckDuckGoSearch.answers (package:duckduckgo_search/src/ddgs.dart:135:19)

Here is my method call: final answer = await DuckDuckGoSearch().answers('who is the ceo of tesla');

I hope you can fix it