Skip to content

Update main.dart #11

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

Merged
merged 1 commit into from
Nov 14, 2018
Merged

Update main.dart #11

merged 1 commit into from
Nov 14, 2018

Conversation

Ephenodrom
Copy link
Contributor

"JSON" changed to "json" as it is written as part 'json.dart'; in the convert.dart file. "JSON" displays an error in the Android Studio IDE.

"JSON" changed to "json" as it is written as part 'json.dart'; in the convert.dart file. "JSON" displays an error in the Android Studio IDE.
@nisrulz
Copy link
Owner

nisrulz commented Nov 13, 2018

@Ephenodrom can you also attach the error stack trace you are able to see when using in Android Studio?

Thank you

@Ephenodrom
Copy link
Contributor Author

Ephenodrom commented Nov 14, 2018

There is no stacktrace at all but the "Dart Analysis" tool comes up with this error :

error: Undefined name 'JSON'. (undefined_identifier at [flutter_app] lib/main.dart:37)

How to reproduce :

  • Make a new dart file in Android Studio
  • Copy the code from the github repository main.dart file
  • Open Dart Analysis Tab in Android Studio

It also mentioned on this page to write it as "json" instead of "JSON".
https://api.dartlang.org/stable/2.0.0/dart-convert/json-constant.html

Maybe this changed over time from "JSON" to "json".

Regards :)

@nisrulz nisrulz merged commit af4420f into nisrulz:develop Nov 14, 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

Successfully merging this pull request may close these issues.

2 participants