materialTheme property
We still need to use the material theme for some widgets. This should not be used for any custom widgets.
Implementation
ThemeData get materialTheme {
return ThemeData.from(
colorScheme: ColorScheme(
background: colors.background,
primary: colors.primary,
secondary: colors.secondary,
surface: colors.surface,
error: colors.error,
onPrimary: colors.onPrimary,
onSecondary: colors.onSecondary,
onError: Colors.white,
brightness: colors.brightness,
onBackground: colors.foreground2,
onSurface: colors.foreground1,
),
);
}