ColorScheme.light constructor Null safety
- {Brightness brightness = Brightness.light,
- Color primary = const Color(0xff6200ee),
- Color onPrimary = Colors.white,
- Color? primaryContainer,
- Color? onPrimaryContainer,
- Color secondary = const Color(0xff03dac6),
- Color onSecondary = Colors.black,
- Color? secondaryContainer,
- Color? onSecondaryContainer,
- Color? tertiary,
- Color? onTertiary,
- Color? tertiaryContainer,
- Color? onTertiaryContainer,
- Color error = const Color(0xffb00020),
- Color onError = Colors.white,
- Color? errorContainer,
- Color? onErrorContainer,
- Color background = Colors.white,
- Color onBackground = Colors.black,
- Color surface = Colors.white,
- Color onSurface = Colors.black,
- Color? surfaceVariant,
- Color? onSurfaceVariant,
- Color? outline,
- Color? shadow,
- Color? inverseSurface,
- Color? onInverseSurface,
- Color? inversePrimary,
- Color? surfaceTint,
- @Deprecated('Use primary or primaryContainer instead. ' 'This feature was deprecated after v2.6.0-0.0.pre.') Color? primaryVariant = const Color(0xff3700b3),
- @Deprecated('Use secondary or secondaryContainer instead. ' 'This feature was deprecated after v2.6.0-0.0.pre.') Color? secondaryVariant = const Color(0xff018786)}
Create a ColorScheme based on a purple primary color that matches the baseline Material color scheme.
Implementation
const ColorScheme.light({
this.brightness = Brightness.light,
this.primary = const Color(0xff6200ee),
this.onPrimary = Colors.white,
Color? primaryContainer,
Color? onPrimaryContainer,
this.secondary = const Color(0xff03dac6),
this.onSecondary = Colors.black,
Color? secondaryContainer,
Color? onSecondaryContainer,
Color? tertiary,
Color? onTertiary,
Color? tertiaryContainer,
Color? onTertiaryContainer,
this.error = const Color(0xffb00020),
this.onError = Colors.white,
Color? errorContainer,
Color? onErrorContainer,
this.background = Colors.white,
this.onBackground = Colors.black,
this.surface = Colors.white,
this.onSurface = Colors.black,
Color? surfaceVariant,
Color? onSurfaceVariant,
Color? outline,
Color? shadow,
Color? inverseSurface,
Color? onInverseSurface,
Color? inversePrimary,
Color? surfaceTint,
@Deprecated(
'Use primary or primaryContainer instead. '
'This feature was deprecated after v2.6.0-0.0.pre.'
)
Color? primaryVariant = const Color(0xff3700b3),
@Deprecated(
'Use secondary or secondaryContainer instead. '
'This feature was deprecated after v2.6.0-0.0.pre.'
)
Color? secondaryVariant = const Color(0xff018786),
}) : assert(brightness != null),
assert(primary != null),
assert(onPrimary != null),
assert(secondary != null),
assert(onSecondary != null),
assert(error != null),
assert(onError != null),
assert(background != null),
assert(onBackground != null),
assert(surface != null),
assert(onSurface != null),
_primaryContainer = primaryContainer,
_onPrimaryContainer = onPrimaryContainer,
_secondaryContainer = secondaryContainer,
_onSecondaryContainer = onSecondaryContainer,
_tertiary = tertiary,
_onTertiary = onTertiary,
_tertiaryContainer = tertiaryContainer,
_onTertiaryContainer = onTertiaryContainer,
_errorContainer = errorContainer,
_onErrorContainer = onErrorContainer,
_surfaceVariant = surfaceVariant,
_onSurfaceVariant = onSurfaceVariant,
_outline = outline,
_shadow = shadow,
_inverseSurface = inverseSurface,
_onInverseSurface = onInverseSurface,
_inversePrimary = inversePrimary,
_primaryVariant = primaryVariant,
_secondaryVariant = secondaryVariant,
_surfaceTint = surfaceTint;