Closed ChaserVasya closed 2 months ago
Thanks for sharing your thoughts. I understand the frustration with the extra work required by @TailorMixin
compared to the old @Tailor
approach.
The switch was made because the previous method had some issues, especially with static properties. Working with those was not type-safe and often led to errors when assigning values to the theme. The need for a dummy class for code generation was also problematic—it wasn't really aligned with best practices, like avoiding unnecessary code.
The new approach with @TailorMixin might involve more manual setup, but it's more reliable (you're also able to freely add your own methods and work with other generators without them being handled by the package) and closer to what we envision for the package. There’s a chance things will improve in future Dart releases, especially when macros get fully implemented.
Problem
@Tailor was good decision for my project. I delegate to it many boilerplate. Now I need to write this boilerplate by hand with @TailorMixin.
Desired Solution
Generate theme constructing from static field definitions, like it was with @Tailor
Alternatives Considered
No response
On which platorm do you expect this solution?
All
With @Tailor
This code snippet was generated:
With @TailorMixin
I write it with myself. It is error-prone work