defaultTheme static method

ThemeData defaultTheme(
  1. BuildContext context,
  2. ColorScheme colorScheme
)

Implementation

static ThemeData defaultTheme(BuildContext context, ColorScheme colorScheme) {
  return ThemeData(
    splashColor: Colors.transparent,
    splashFactory: NoSplash.splashFactory,
    highlightColor: Colors.transparent,
    hoverColor: Colors.transparent,
    colorScheme: colorScheme,
    textTheme: TextTheme(
      bodyMedium: TextStyle(
        letterSpacing: -0.41,
        color: colorScheme.secondary,
      ),
      titleMedium: const TextStyle(
        fontSize: 18,
        fontWeight: FontWeight.w600,
        letterSpacing: -0.41,
      ),
      titleLarge: const TextStyle(
        fontWeight: FontWeight.w600,
        letterSpacing: -0.41,
      ),
    ),
    filledButtonTheme: FilledButtonThemeData(
      style: TextButton.styleFrom(
        splashFactory: NoSplash.splashFactory,
        minimumSize: const Size.fromHeight(54),
        textStyle: const TextStyle(
          fontSize: 18,
          fontWeight: FontWeight.w700,
        ),
        shape: RoundedRectangleBorder(
          borderRadius: BorderRadius.circular(8),
        ),
      ),
    ),
    inputDecorationTheme: InputDecorationTheme(
      fillColor: colorScheme.surfaceContainer,
      filled: true,
      hintStyle: TextStyle(
        fontSize: 18,
        fontWeight: FontWeight.w600,
        color: colorScheme.secondary.withAlpha(255 ~/ 4),
      ),
      contentPadding: const EdgeInsets.symmetric(
        vertical: 15.0,
        horizontal: 15.0,
      ),
      border: const OutlineInputBorder(
        borderRadius: BorderRadius.all(Radius.circular(8)),
      ),
    ),
  );
}