Closed haoyuanwu closed 2 years ago
Hi @haoyuanwu,
Null-safety has been supported since Flutter Intl 1.13.0
.
To enable the generation of null-safety code make sure that the sdk version is >=2.12.0
in the pubspec.yaml
file and that you have the appropriate version of the Flutter Intl plugin that supports null-safety.
The pubspec.yaml
file:
environment:
sdk: ">=2.12.0 <3.0.0"
I have the same problem.
pubspec.ymal
file of my project module:
environment:
sdk: ">=2.12.0 <3.0.0"
flutter: ">=2.10.0"
But generated code without null-safety when I connect plugin.
Are there any other conditions that need to be checked?
Hi @korilin,
Which version of the Flutter Intl plugin are you using: 1.17.3-2019.2
or 1.17.3-2020.3
?
Maybe reinstalling the Flutter Intl plugin might help.
Also, the Flutter Intl plugin uses the intl_utils
package under the hood to generate localization code.
In case you do not have intl_utils ^2.0.0
activated globally (flutter pub global list
), maybe reactivation might help.
Deactivate the intl_utils
package:
flutter pub global deactivate intl_utils
Trigger localization code generation to activate the proper version of the intl_utils
(e.g. save update arb file).
Hi @lzoran,
Thanks for your help, I'm use Flutter Intl 1.17.3-2020.3
.
After I executed flutter pub global deactivate intl_utils
, the plugin was generate null-safety code normally.
I'm closing this issue. In case you notice any irregularity, feel free to reopen it.
Each change will be revised, so please support the null security writing method as soon as possible
and