dark static method
Implementation
static ThemeData dark() {
final base = ThemeData.dark(useMaterial3: true);
final scheme = ColorScheme.fromSeed(
seedColor: VideoEditorColors.primary,
brightness: Brightness.dark,
).copyWith(
primary: VideoEditorColors.primary,
onPrimary: VideoEditorColors.playerInk,
secondary: VideoEditorColors.secondary,
surface: VideoEditorColors.surface,
onSurface: VideoEditorColors.textPrimary,
error: VideoEditorColors.danger,
);
return base.copyWith(
scaffoldBackgroundColor: VideoEditorColors.background,
colorScheme: scheme,
textTheme: base.textTheme.apply(
fontFamily: VideoEditorTextStyles.fontFamily,
bodyColor: VideoEditorColors.textPrimary,
displayColor: VideoEditorColors.textPrimary,
),
iconTheme: const IconThemeData(color: VideoEditorColors.textPrimary),
appBarTheme: const AppBarTheme(
backgroundColor: VideoEditorColors.background,
foregroundColor: VideoEditorColors.textPrimary,
elevation: 0,
surfaceTintColor: Colors.transparent,
),
dialogTheme: DialogThemeData(
backgroundColor: VideoEditorColors.surface,
surfaceTintColor: Colors.transparent,
titleTextStyle: VideoEditorTextStyles.dialogTitle,
contentTextStyle: VideoEditorTextStyles.body,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(VideoEditorRadii.sheetRadius),
),
),
bottomSheetTheme: const BottomSheetThemeData(
backgroundColor: VideoEditorColors.surface,
surfaceTintColor: Colors.transparent,
showDragHandle: false,
),
listTileTheme: const ListTileThemeData(
iconColor: VideoEditorColors.textSecondary,
textColor: VideoEditorColors.textPrimary,
),
dividerTheme: const DividerThemeData(color: VideoEditorColors.divider),
snackBarTheme: SnackBarThemeData(
backgroundColor: VideoEditorColors.card,
contentTextStyle: VideoEditorTextStyles.body.copyWith(fontSize: 14),
behavior: SnackBarBehavior.floating,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(VideoEditorRadii.card),
),
),
sliderTheme: const SliderThemeData(
activeTrackColor: VideoEditorColors.primary,
inactiveTrackColor: VideoEditorColors.trackInactiveFaint,
thumbColor: VideoEditorColors.textPrimary,
overlayColor: VideoEditorColors.sliderOverlay,
valueIndicatorColor: VideoEditorColors.card,
valueIndicatorTextStyle: TextStyle(
color: VideoEditorColors.textPrimary,
fontSize: 12,
),
),
chipTheme: base.chipTheme.copyWith(
backgroundColor: VideoEditorColors.track,
selectedColor: VideoEditorColors.primary,
// Selected chips are white, so their label turns dark.
labelStyle: TextStyle(
color: WidgetStateColor.resolveWith(
(states) => states.contains(WidgetState.selected)
? VideoEditorColors.playerInk
: VideoEditorColors.textPrimary,
),
),
secondaryLabelStyle: const TextStyle(color: VideoEditorColors.playerInk),
side: BorderSide.none,
checkmarkColor: VideoEditorColors.playerInk,
),
progressIndicatorTheme: const ProgressIndicatorThemeData(
color: VideoEditorColors.primary,
),
switchTheme: SwitchThemeData(
thumbColor: WidgetStateProperty.resolveWith(
(states) => states.contains(WidgetState.selected)
? VideoEditorColors.playerInk
: VideoEditorColors.textSecondary,
),
trackColor: WidgetStateProperty.resolveWith(
(states) => states.contains(WidgetState.selected)
? VideoEditorColors.primary
: VideoEditorColors.track,
),
),
elevatedButtonTheme: ElevatedButtonThemeData(
style: VideoEditorComponents.primaryButtonStyle(),
),
textButtonTheme: TextButtonThemeData(
style: TextButton.styleFrom(
foregroundColor: VideoEditorColors.textPrimary,
),
),
outlinedButtonTheme: OutlinedButtonThemeData(
style: OutlinedButton.styleFrom(
foregroundColor: VideoEditorColors.textPrimary,
side: const BorderSide(color: VideoEditorColors.sheetBorder),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(VideoEditorRadii.button),
),
),
),
inputDecorationTheme: const InputDecorationTheme(
hintStyle: VideoEditorTextStyles.hint,
),
);
}