buildFastThemeWithColors static method
Implementation
static ThemeData buildFastThemeWithColors({
required ThemeData baseTheme,
required Color primaryColor,
Color? secondaryColor,
Color? tertiaryColor,
Color? primaryColorDark,
}) {
final textTheme = baseTheme.textTheme;
final secondaryColor0 = secondaryColor ?? baseTheme.colorScheme.secondary;
final tertiaryColor0 = tertiaryColor ?? textTheme.labelSmall!.color;
return baseTheme.copyWith(
inputDecorationTheme: _buildInputDecorationTheme(baseTheme, primaryColor),
primaryColorDark: primaryColorDark ?? baseTheme.primaryColorDark,
buttonTheme: _buildButtonThemeData(primaryColor),
primaryColor: primaryColor,
floatingActionButtonTheme: FloatingActionButtonThemeData(
backgroundColor: primaryColor,
),
textTheme: textTheme.copyWith(
bodySmall: textTheme.bodySmall!.copyWith(color: secondaryColor0),
labelSmall: textTheme.labelSmall!.copyWith(color: tertiaryColor0),
),
colorScheme: ColorScheme.fromSwatch().copyWith(
secondary: secondaryColor0,
),
);
}