localizely / flutter-intl-intellij

This Android Studio & IntelliJ plugin generates boilerplate code for localization of Flutter apps with official Dart Intl library
MIT License
129 stars 4 forks source link

Arb key with select generated code throws error #95

Closed Merculiar closed 1 year ago

Merculiar commented 1 year ago

Select generated code throws an error - The argument type 'dynamic' can't be assigned to the parameter type 'String' The code is taken from the example of the plugin. Select in arb:

Screenshot 2023-04-18 at 14 27 32

Generated String:

Screenshot 2023-04-18 at 14 27 24

Red error is annoying.

lzoran commented 1 year ago

Hi @Merculiar,

I believe that you have implicit-casts set to false in the analysis_options.yaml file. If that is the case, perhaps excluding the generated files from the Dart Analysis might help.

The analysis_options.yaml file

analyzer:
  exclude: [lib/generated/**]
  strong-mode:
    implicit-casts: false

Hope it helps!

lzoran commented 1 year ago

Duplicate of #7.

lzoran commented 1 year ago

Closing this issue as a duplicate. In case I missed something, feel free to open this issue again.