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

Error: The getter ‘JSON’ isn’t defined for the class ‘#lib::Repository’. #10

Closed
AnassL opened this issue Dec 11, 2018 · 1 comment

Comments

@AnassL
Copy link

AnassL commented Dec 11, 2018

The app throws the following error:

package: test_app/data/repository.dart: error: line 154:24 Error: The getter ‘JSON’ isn’t defined for the class ‘#lib::Repository’.
Try correcting the name to the name of an existing getter, or defining a getter or field named ‘JSON’.

I am using Flutter SDK v1.0 stable, and here are the dependencies versions I have in the pubspec.yaml:

http: ^0.11.3+16
sqflite: ^0.13.0
path_provider: "^0.4.1"
redux: '^3.0.0'
flutter_redux: '^0.5.2'

cupertino_icons: ^0.1.2
rxdart: 0.19.0

@AnassL
Copy link
Author

AnassL commented Dec 11, 2018

I've just seen the current pull request by @bnchdrff, it helped solve the issue:

In repository.dart changed JSON.decode(response.body) to jsonDecode(response.body)
And in collection_preview.dart changed double.INFINITY to double.infinity

@AnassL AnassL closed this as completed Dec 11, 2018
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

1 participant