dynamicLightTheme function

ThemeData dynamicLightTheme(
  1. ColorScheme? lightColorScheme
)

Implementation

ThemeData dynamicLightTheme(ColorScheme? lightColorScheme) {
  final baseScheme =
      lightColorScheme ?? const ColorScheme.light(primary: kPrimaryColor);

  return ThemeData(
    useMaterial3: true,
    colorScheme: baseScheme,
    scaffoldBackgroundColor: baseScheme.surface,
    fontFamily: GoogleFonts.notoSans().fontFamily,
    appBarTheme: appBarTheme().copyWith(
      backgroundColor: Colors.transparent,
      iconTheme: IconThemeData(color: baseScheme.onSurface),
      titleTextStyle: GoogleFonts.spaceGrotesk(
          color: baseScheme.onSurface,
          fontSize: 18,
          fontWeight: FontWeight.bold),
    ),
    inputDecorationTheme: inputDecorationTheme(
      fillColor: baseScheme.surfaceContainerHigh,
      borderColor: baseScheme.outline,
      focusColor: baseScheme.primary,
    ),
    textTheme: textTheme().apply(
      bodyColor: baseScheme.onSurface,
      displayColor: baseScheme.onSurface,
    ),
    extensions: <ThemeExtension<dynamic>>[
      DiagramTheme(
        canvasBg: baseScheme.surfaceContainerLowest,
        panelBg: baseScheme.surface,
        gridLine: baseScheme.onSurface.withValues(alpha: 0.05),
        nodeBg: baseScheme.surfaceContainerHigh,
        nodeBorder: baseScheme.outline,
        textColor: baseScheme.onSurface,
        accentColor: baseScheme.primary,
        isDark: false,
      ),
    ],
  );
}