darkTheme static method

ThemeData darkTheme({
  1. Color? primary,
  2. Color? onPrimary,
  3. Color? secondary,
  4. Color? onSecondary,
})

Implementation

static ThemeData darkTheme({
  Color? primary,
  Color? onPrimary,
  Color? secondary,
  Color? onSecondary,
}) =>
    ThemeData.from(
      useMaterial3: true,
      colorScheme: ColorScheme.dark(
        primary: primary ?? const Color(0xfffafafa),
        onPrimary: onPrimary ?? const Color(0xff232325),
        secondary: secondary ?? const Color(0xff27272a),
        onSecondary: onSecondary ?? const Color(0xfffafafa),
        surface: const Color(0xff09090b),
        onSurface: const Color(0xfffafafa),
        surfaceContainer: const Color(0xff1b1917),
        error: const Color(0xff752622),
        onError: const Color(0xfffafafa),
      ),
    ).copyWith(
      dividerColor: const Color(0xff27272a),
      splashFactory: NoSplash.splashFactory,
      iconTheme: const IconThemeData(
        size: 20,
      ),
      floatingActionButtonTheme: const FloatingActionButtonThemeData(
        elevation: 0,
        hoverElevation: 0,
        highlightElevation: 0,
        focusElevation: 0,
      ),
      materialTapTargetSize: MaterialTapTargetSize.padded,
    );