Iteo/theme_tailor

Fields are dynamic in generated code.

aarajput opened this issue · 3 comments

In code, in theme_tailor->pubspec.yaml, its saying that analyzer: ">=4.6.0 <6.0.0" is supported, but when you use anaylzer version 5.3.1, then Color becomes dynamic.

When i used

dependency_overrides:
  analyzer: 4.7.0

it worked fine.

Hi!
Thank you for creating this issue.
Unfortunately, I can't reproduce described behavior using theme_tailor: 1.0.8 along with analyzer: 5.3.1.
Can you provide a minimal reproducible code sample so we can investigate this?

Hello, we've just pushed updated versions of both packages to the pub.dev (v 1.1.1). It fixes several minor bugs as well as some of the 'dynamic generation' problems. In general it was caused by the issue with the analyzer and we've changed the way to handle it for some simple like just passing color / text style (and other Flutter types)

We've also updated some of the docs to guide devs what is the recommended way to use the generator here: DOCS
Please keep in mind that some of the types like List<List> will still result in incorrectly generated code because of the limitation of the current parser - for cases where you want to pass Flutter types in a list or a map it is recommended to wrapp them in non generic class or use ThemeExtensionClass. Here are examples how to do it