Is it a good practice Theme based on extension?

Viewed 26

I'm creating my theme based on extending ThemeData, the main reason is that I have access to brightness where I can get if my actual theme is dark or light.

Is this a good practice? May I have any drawbacks or performance issues?

extension MyAppBarTheme on ThemeData {
  TextStyle get myBarTitleStyle {}
}

extension MyFlatButtonIconTheme on ThemeData {
  TextStyle get myFlatButtonStyle {}
}
0 Answers
Related