Closed cesarferreira closed 3 years ago
Hi @cesarferreira.
Sorry for the lack of documentation.
Could you try to modify your pubspec.yaml
:
flutter_gen:
null_safety: false
And then run fluttergen again?
It worked! but this line at the top makes it complain that im not null sound
// @dart = 2.10
@cesarferreira
From the error image, it seems you are in a null safety project?
It worked! but this line at the top makes it complain that im not null sound
Did you mean this?
My min sdk is 2.7.0 and even tho the fields are not optional anymore, the line at the top that says
// @dart = 2.10
turns the whole document red, i can easily fix it by simply removing that // dart = 2.10 line but i need to go there every time, is there a way to turn it off? to not have it being pasted at the beginning of the file?
@cesarferreira
Thanks for the information about your project.
After discussion with @wasabeef, we are deciding to not support the project with dart sdk < 2.12.
The version comment @dart=2.10
and pubspec key null_safety: false
are aim to support the project that cannot fully migrate to null-safety (dart >= 2.12).
So if you want to use flutter_gen with your project, please try the old version like 1.31.
Thanks.
First of all, amazing tool! Use it on the daily!
Is there a way to tell the tool not to generate dart 2.12 optional fields? Many of my projects are still on non null-sound libraries, it's quite tedious to go and delete all the
?
every time the tool runs