themeFor function
Constructs the light or dark theme for the app taking into account IDE-supplied theming.
Implementation
ThemeData themeFor({
required bool isDarkTheme,
required IdeTheme ideTheme,
required ThemeData theme,
}) {
final colorTheme = isDarkTheme
? _darkTheme(ideTheme: ideTheme, theme: theme)
: _lightTheme(ideTheme: ideTheme, theme: theme);
return colorTheme.copyWith(
primaryTextTheme:
theme.primaryTextTheme.merge(colorTheme.primaryTextTheme),
textTheme: theme.textTheme.merge(colorTheme.textTheme));
}