dark static method

ThemeData dark({
  1. Color primary = const Color(0xFF2196F3),
})

Implementation

static ThemeData dark({Color primary = const Color(0xFF2196F3)}) {
  final base = ThemeData.dark(useMaterial3: true);
  return base.copyWith(
    colorScheme: ColorScheme.fromSeed(
      seedColor: primary,
      brightness: Brightness.dark,
    ),
    textTheme: base.textTheme.copyWith(
      bodyMedium: const TextStyle(fontSize: 14),
      bodyLarge: const TextStyle(fontSize: 16),
      titleLarge: const TextStyle(
        fontSize: 20,
        fontWeight: FontWeight.w600,
      ),
    ),
    appBarTheme: base.appBarTheme.copyWith(
      elevation: 0,
      centerTitle: true,
      titleTextStyle: const TextStyle(
        fontSize: 18,
        fontWeight: FontWeight.w600,
        color: Colors.white,
      ),
    ),
  );
}