buildTheme method

ThemeData buildTheme({
  1. required bool isLight,
})

Implementation

ThemeData buildTheme({required bool isLight}) {
  final colorPallete = isLight ? LKColorPaletteLight() : LKColorPaletteDark();

  return ThemeData(
    useMaterial3: true,
    cardColor: colorPallete.bg2,
    inputDecorationTheme: InputDecorationTheme(
      fillColor: colorPallete.bg2,
      hintStyle: TextStyle(
        color: colorPallete.fg4,
        fontSize: 14,
      ),
    ),
    buttonTheme: ButtonThemeData(
      disabledColor: Colors.red,
      colorScheme: ColorScheme.dark(
        primary: Colors.white,
        secondary: Colors.white,
        surface: colorPallete.fgAccent,
      ),
    ),
    colorScheme: isLight
        ? const ColorScheme.light(
            primary: Colors.black,
            secondary: Colors.black,
            surface: Colors.white,
          )
        : const ColorScheme.dark(
            primary: Colors.white,
            secondary: Colors.white,
            surface: Colors.black,
          ),
    textTheme: const TextTheme(
      bodyMedium: TextStyle(
        fontSize: 17,
        fontWeight: FontWeight.w400,
      ),
    ),
  );
}