ColorScheme.highContrastDark constructor
- Brightness brightness = Brightness.dark,
- Color primary = const Color(0xffefb7ff),
- Color onPrimary = Colors.black,
- Color? primaryContainer,
- Color? onPrimaryContainer,
- Color? primaryFixed,
- Color? primaryFixedDim,
- Color? onPrimaryFixed,
- Color? onPrimaryFixedVariant,
- Color secondary = const Color(0xff66fff9),
- Color onSecondary = Colors.black,
- Color? secondaryContainer,
- Color? onSecondaryContainer,
- Color? secondaryFixed,
- Color? secondaryFixedDim,
- Color? onSecondaryFixed,
- Color? onSecondaryFixedVariant,
- Color? tertiary,
- Color? onTertiary,
- Color? tertiaryContainer,
- Color? onTertiaryContainer,
- Color? tertiaryFixed,
- Color? tertiaryFixedDim,
- Color? onTertiaryFixed,
- Color? onTertiaryFixedVariant,
- Color error = const Color(0xff9b374d),
- Color onError = Colors.black,
- Color? errorContainer,
- Color? onErrorContainer,
- Color surface = const Color(0xff121212),
- Color onSurface = Colors.white,
- Color? surfaceDim,
- Color? surfaceBright,
- Color? surfaceContainerLowest,
- Color? surfaceContainerLow,
- Color? surfaceContainer,
- Color? surfaceContainerHigh,
- Color? surfaceContainerHighest,
- Color? onSurfaceVariant,
- Color? outline,
- Color? outlineVariant,
- Color? shadow,
- Color? scrim,
- Color? inverseSurface,
- Color? onInverseSurface,
- Color? inversePrimary,
- Color? surfaceTint,
- @Deprecated('Use surface instead. ' 'This feature was deprecated after v3.18.0-0.1.pre.') Color? background = const Color(0xff121212),
- @Deprecated('Use onSurface instead. ' 'This feature was deprecated after v3.18.0-0.1.pre.') Color? onBackground = Colors.white,
- @Deprecated('Use surfaceContainerHighest instead. ' 'This feature was deprecated after v3.18.0-0.1.pre.') Color? surfaceVariant,
Create a high contrast ColorScheme based on the dark baseline Material 2 color scheme.
This constructor shouldn't be used to update the Material 3 color scheme.
For Material 3, use ColorScheme.fromSeed to create a color scheme
from a single seed color based on the Material 3 color system.
Override the brightness property of ColorScheme.fromSeed to create a
dark color scheme. To create a high-contrast color scheme, set
contrastLevel to 1.0.
This example demonstrates how to create a color scheme similar to ColorScheme.highContrastDark
using the ColorScheme.fromSeed constructor:
link
colorScheme: ColorScheme.fromSeed(
seedColor: const Color(0xffefb7ff),
brightness: Brightness.dark,
).copyWith(
primaryContainer: const Color(0xffefb7ff),
onPrimaryContainer: Colors.black,
secondaryContainer: const Color(0xff66fff9),
onSecondaryContainer: Colors.black,
error: const Color(0xff9b374d),
onError: Colors.white,
),
Implementation
const ColorScheme.highContrastDark({
this.brightness = Brightness.dark,
this.primary = const Color(0xffefb7ff),
this.onPrimary = Colors.black,
this._primaryContainer,
this._onPrimaryContainer,
this._primaryFixed,
this._primaryFixedDim,
this._onPrimaryFixed,
this._onPrimaryFixedVariant,
this.secondary = const Color(0xff66fff9),
this.onSecondary = Colors.black,
this._secondaryContainer,
this._onSecondaryContainer,
this._secondaryFixed,
this._secondaryFixedDim,
this._onSecondaryFixed,
this._onSecondaryFixedVariant,
this._tertiary,
this._onTertiary,
this._tertiaryContainer,
this._onTertiaryContainer,
this._tertiaryFixed,
this._tertiaryFixedDim,
this._onTertiaryFixed,
this._onTertiaryFixedVariant,
this.error = const Color(0xff9b374d),
this.onError = Colors.black,
this._errorContainer,
this._onErrorContainer,
this.surface = const Color(0xff121212),
this.onSurface = Colors.white,
this._surfaceDim,
this._surfaceBright,
this._surfaceContainerLowest,
this._surfaceContainerLow,
this._surfaceContainer,
this._surfaceContainerHigh,
this._surfaceContainerHighest,
this._onSurfaceVariant,
this._outline,
this._outlineVariant,
this._shadow,
this._scrim,
this._inverseSurface,
this._onInverseSurface,
this._inversePrimary,
this._surfaceTint,
@Deprecated(
'Use surface instead. '
'This feature was deprecated after v3.18.0-0.1.pre.',
)
this._background = const Color(0xff121212),
@Deprecated(
'Use onSurface instead. '
'This feature was deprecated after v3.18.0-0.1.pre.',
)
this._onBackground = Colors.white,
@Deprecated(
'Use surfaceContainerHighest instead. '
'This feature was deprecated after v3.18.0-0.1.pre.',
)
this._surfaceVariant,
});