Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type string is not a subtype of type bool #52

Open
samuelvasecka opened this issue Feb 4, 2022 · 1 comment
Open

Type string is not a subtype of type bool #52

samuelvasecka opened this issue Feb 4, 2022 · 1 comment
Assignees

Comments

@samuelvasecka
Copy link

In json_impl.dart is this code:
@override bool getBool({ required String key, bool defaultValue = false, }) => _resource[key] ?? defaultValue;
but if _resource[key] is not type bool, it shows error

@myConsciousness
Copy link
Member

myConsciousness commented Feb 5, 2022

Hi @samuelvasecka ,

Does this mean that an error has occurred in the above implementation?

Some of the implementations are not yet reflected in the test class, but I have checked the operation of all methods whose scopes are exposed as public. But as for the field types, they are based on the response JSON from the Duolingo API, so some fields could not be checked in the account I have.

I'm sure there will be type errors for the values of those unchecked fields, but can you share which fields specifically cause this error?

@myConsciousness myConsciousness self-assigned this Feb 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants