localizely / flutter-intl-vscode

This VS Code extension generates boilerplate code for localization of Flutter apps with official Dart Intl library
MIT License
87 stars 1 forks source link

Can't build because of missing nullable types #72

Closed miguelpruivo closed 3 years ago

miguelpruivo commented 3 years ago
Captura de ecrã 2021-06-02, às 14 43 41

This is a major issue because I can't build and generated files always come up without nullable types support.

lzoran commented 3 years ago

Hi @miguelpruivo,

The Flutter Intl extension checks the min version of the sdk under the pubspec.yaml file and generates localization code according to that value.

Could you check if updating the min sdk value solves your problem?

environment:
  sdk: ">=2.12.0 <3.0.0"
miguelpruivo commented 3 years ago

Hi @lzoran this is my environment:

environment:
  sdk: ">=2.13.0 <3.0.0"

It was working fine until today when intl updated and for some reason I start experiencing this issue.

lzoran commented 3 years ago

Interesting...

I've tried your environment config, and everything works fine on my machine. 😕

The Flutter Intl extension relies on the globally activated intl_utils package. For Flutter projects that have min sdk constraint >=2.12.0, the extension should activate the intl_utils ^2.0.0.

Probably something went wrong after the update. Maybe deactivating the currently active intl_utils package and re-triggering the generation could help?

In case this does not help, could you please provide us more details so we can try to reproduce this issue (VS Code version, Flutter Intl extension version, Flutter version)?

miguelpruivo commented 3 years ago

@lzoran just removed the generated folder and saved an .arb again and it fetched the right version, so it seems. Might have glitched during some update.

Thank you for your time.