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

[BUG]: gen fails when there is only list in a JSON #323

Closed
2 tasks done
tomas-dorda opened this issue Oct 19, 2022 · 1 comment · Fixed by #324 or #332
Closed
2 tasks done

[BUG]: gen fails when there is only list in a JSON #323

tomas-dorda opened this issue Oct 19, 2022 · 1 comment · Fixed by #324 or #332
Assignees
Labels
bug Something isn't working
Milestone

Comments

@tomas-dorda
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Version

5.0.2

Command type

build_runner (Default)

What happened?

The JSON is not necessary Map<String, dynamic> it crashes when there is JSON like:
[ { "id": "ABC42" } ]

Relevant a pubspec.yaml.

flutter_gen:
  output: lib/gen/
  line_length: 80
  integrations:
    flutter_svg: false
    flare_flutter: false
    rive: false
    lottie: true

Relevant log output

[SEVERE] flutter_gen_runner on $package$:

type 'List<dynamic>' is not a subtype of type 'Map<String, dynamic>' in type cast

Code of Conduct

  • I agree to follow this project's Code of Conduct
@tomas-dorda tomas-dorda added the bug Something isn't working label Oct 19, 2022
@tomas-dorda tomas-dorda changed the title [BUG]: [BUG]: gen fails when there is only list in a JSON Oct 19, 2022
@wasabeef wasabeef self-assigned this Oct 20, 2022
@wasabeef wasabeef added this to the 5.0.3 milestone Oct 20, 2022
@wasabeef
Copy link
Member

@tomas-dorda
I just released v5.0.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants