Hot reload don't work
Closed this issue · 2 comments
JasCodes commented
Give the option manually create themes as updating them in the array won't hot reload.
Rongix commented
Hey, theme tailor depends on code generation to lower the required boilerplate, if the data is not re-generated then it won't appear during hot reload. You can try to run build_runner watch to make your workflow a bit smoother (and use hot restart)
flutter pub run build_runner watch
You can generate a theme class without predefined themes so they won't generate and then you can fill it manually with values. In that case, it should behave like a 'normal' theme extension class and work with hot reload. I think that's what you're asking for, let me know if it helps!
@Tailor(themes: [])
class _$ChatBubble {
static const List<Color> background = [];
static const List<Color> foreground = [];
static const List<TextStyle> text = [];
}
final bubble = ChatBubble(
background: Colors.blue,
foreground: Colors.white,
text: TextStyle(fontSize: 14),
);
JasCodes commented
Cool!