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

NoSuchMethodError: The method 'cast' was called on null. #21

Closed
blue7wings opened this issue Sep 8, 2020 · 8 comments · Fixed by #26
Closed

NoSuchMethodError: The method 'cast' was called on null. #21

blue7wings opened this issue Sep 8, 2020 · 8 comments · Fixed by #26
Milestone

Comments

@blue7wings
Copy link

hi, I can't generate asset, maybe cause by code error.
image
Dart SDK version: 2.9.0-21.10.beta (beta) (Tue Jul 21 10:46:30 2020 +0200) on "windows_x64"

@nekocode nekocode mentioned this issue Sep 8, 2020
wasabeef added a commit that referenced this issue Sep 8, 2020
@wasabeef wasabeef added this to the 1.0.1 milestone Sep 8, 2020
@lifenautjoe
Copy link

I'm still seeing this issue.

[SEVERE]
NoSuchMethodError: The method 'cast' was called on null.
Receiver: null
Tried calling: cast<String>()

No files generated.

@lifenautjoe
Copy link

Can we please keep this open @wasabeef ? I know you've already fixed it but it might be useful for people to know that the package won't work until that version is released.

@wasabeef wasabeef reopened this Sep 8, 2020
@wasabeef
Copy link
Member

wasabeef commented Sep 8, 2020

@lifenautjoe
Sorry I'm not yet releasing the fix version of 1.0.1.
Can I ask you? Which uses your PC? macos?ubuntu?windows?

@lifenautjoe
Copy link

Thanks @wasabeef :-)

I'm on MacOS.

Here's my Flutter doctor in case it helps.

[✓] Flutter (Channel unknown, 1.20.3, on macOS 11.0 20A5354i, locale en-NL)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 12.0)
[✓] Android Studio (version 4.0)
[✓] IntelliJ IDEA Ultimate Edition (version 2020.1.3)
[✓] VS Code (version 1.48.0)
[!] Connected device

I've also tried using the main branch which has the patch merged but still see the same error. I'm guessing you already know though if you're asking me for my device details :-)

@lifenautjoe
Copy link

Correction, the main branch does work. Sorry, caching issue.

@wasabeef
Copy link
Member

wasabeef commented Sep 8, 2020

@lifenautjoe
Thanks.

I will release v1.0.1 within an hour.

@wasabeef
Copy link
Member

wasabeef commented Sep 8, 2020

@blue7wings @nekocode @lifenautjoe

I appreciate all the support.
Just released v1.0.1.

# Homebrew
brew upgrade fluttergen
# Dart command-line
pub global activate flutter_gen
# build_runner
flutter pub get

@lifenautjoe
Copy link

Great job @wasabeef ! Thanks for writing this package and the quick fix! 🥳

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 a pull request may close this issue.

3 participants