MaterialColor class Null safety
- Implemented types
Constructors
-
MaterialColor(int value, Map<
int, Color> swatch) -
constfactory
-
MaterialColor.fromJson(Map<
String, dynamic> json) -
factory
Properties
-
copyWith
→ _$$MaterialColorCopyWith<
_$MaterialColor> -
@JsonKey(ignore: true), read-only
- hashCode → int
-
The hash code for this object.
read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
-
swatch
→ Map<
int, Color> -
read-only
- value → int
-
read-only
Methods
-
map<
TResult extends Object?> (TResult $default(_Color value), {required TResult fromARGB(ColorARGB value), required TResult fromRGBO(ColorRGBO value), required TResult alphaBlend(ColorAlphaBlend value), required TResult material(MaterialColor value), required TResult materialAccentColor(MaterialAccentColor value), required TResult primary(PrimaryColor value), required TResult onPrimary(OnPrimaryColor value), required TResult primaryContainer(PrimaryContainerColor value), required TResult onPrimaryContainer(OnPrimaryContainerColor value), required TResult secondary(SecondaryColor value), required TResult onSecondary(OnSecondaryColor value), required TResult secondaryContainer(SecondaryContainerColor value), required TResult onSecondaryContainer(OnSecondaryContainerColor value), required TResult tertiary(TertiaryColor value), required TResult onTertiary(OnTertiaryColor value), required TResult tertiaryContainer(TertiaryContainerColor value), required TResult onTertiaryContainer(OnTertiaryContainerColor value), required TResult error(ErrorColor value), required TResult onError(OnErrorColor value), required TResult errorContainer(ErrorContainerColor value), required TResult onErrorContainer(OnErrorContainerColor value), required TResult outline(OutlineColor value), required TResult outlineVariant(OutlineVariantColor value), required TResult background(BackgroundColor value), required TResult onBackground(OnBackgroundColor value), required TResult surface(SurfaceColor value), required TResult onSurface(OnSurfaceColor value), required TResult surfaceVariant(SurfaceVariantColor value), required TResult onSurfaceVariant(OnSurfaceVariantColor value), required TResult inverseSurface(InverseSurfaceColor value), required TResult onInverseSurface(OnInverseSurfaceColor value), required TResult inversePrimary(InversePrimaryColor value), required TResult shadow(ShadowColor value), required TResult scrim(ScrimColor value), required TResult surfaceTint(SurfaceTintColor value)}) → TResult -
@optionalTypeArgs, inherited
-
mapOrNull<
TResult extends Object?> (TResult? $default(_Color value)?, {TResult? fromARGB(ColorARGB value)?, TResult? fromRGBO(ColorRGBO value)?, TResult? alphaBlend(ColorAlphaBlend value)?, TResult? material(MaterialColor value)?, TResult? materialAccentColor(MaterialAccentColor value)?, TResult? primary(PrimaryColor value)?, TResult? onPrimary(OnPrimaryColor value)?, TResult? primaryContainer(PrimaryContainerColor value)?, TResult? onPrimaryContainer(OnPrimaryContainerColor value)?, TResult? secondary(SecondaryColor value)?, TResult? onSecondary(OnSecondaryColor value)?, TResult? secondaryContainer(SecondaryContainerColor value)?, TResult? onSecondaryContainer(OnSecondaryContainerColor value)?, TResult? tertiary(TertiaryColor value)?, TResult? onTertiary(OnTertiaryColor value)?, TResult? tertiaryContainer(TertiaryContainerColor value)?, TResult? onTertiaryContainer(OnTertiaryContainerColor value)?, TResult? error(ErrorColor value)?, TResult? onError(OnErrorColor value)?, TResult? errorContainer(ErrorContainerColor value)?, TResult? onErrorContainer(OnErrorContainerColor value)?, TResult? outline(OutlineColor value)?, TResult? outlineVariant(OutlineVariantColor value)?, TResult? background(BackgroundColor value)?, TResult? onBackground(OnBackgroundColor value)?, TResult? surface(SurfaceColor value)?, TResult? onSurface(OnSurfaceColor value)?, TResult? surfaceVariant(SurfaceVariantColor value)?, TResult? onSurfaceVariant(OnSurfaceVariantColor value)?, TResult? inverseSurface(InverseSurfaceColor value)?, TResult? onInverseSurface(OnInverseSurfaceColor value)?, TResult? inversePrimary(InversePrimaryColor value)?, TResult? shadow(ShadowColor value)?, TResult? scrim(ScrimColor value)?, TResult? surfaceTint(SurfaceTintColor value)?}) → TResult? -
@optionalTypeArgs, inherited
-
maybeMap<
TResult extends Object?> (TResult $default(_Color value)?, {TResult fromARGB(ColorARGB value)?, TResult fromRGBO(ColorRGBO value)?, TResult alphaBlend(ColorAlphaBlend value)?, TResult material(MaterialColor value)?, TResult materialAccentColor(MaterialAccentColor value)?, TResult primary(PrimaryColor value)?, TResult onPrimary(OnPrimaryColor value)?, TResult primaryContainer(PrimaryContainerColor value)?, TResult onPrimaryContainer(OnPrimaryContainerColor value)?, TResult secondary(SecondaryColor value)?, TResult onSecondary(OnSecondaryColor value)?, TResult secondaryContainer(SecondaryContainerColor value)?, TResult onSecondaryContainer(OnSecondaryContainerColor value)?, TResult tertiary(TertiaryColor value)?, TResult onTertiary(OnTertiaryColor value)?, TResult tertiaryContainer(TertiaryContainerColor value)?, TResult onTertiaryContainer(OnTertiaryContainerColor value)?, TResult error(ErrorColor value)?, TResult onError(OnErrorColor value)?, TResult errorContainer(ErrorContainerColor value)?, TResult onErrorContainer(OnErrorContainerColor value)?, TResult outline(OutlineColor value)?, TResult outlineVariant(OutlineVariantColor value)?, TResult background(BackgroundColor value)?, TResult onBackground(OnBackgroundColor value)?, TResult surface(SurfaceColor value)?, TResult onSurface(OnSurfaceColor value)?, TResult surfaceVariant(SurfaceVariantColor value)?, TResult onSurfaceVariant(OnSurfaceVariantColor value)?, TResult inverseSurface(InverseSurfaceColor value)?, TResult onInverseSurface(OnInverseSurfaceColor value)?, TResult inversePrimary(InversePrimaryColor value)?, TResult shadow(ShadowColor value)?, TResult scrim(ScrimColor value)?, TResult surfaceTint(SurfaceTintColor value)?, required TResult orElse()}) → TResult -
@optionalTypeArgs, inherited
-
maybeWhen<
TResult extends Object?> (TResult $default(int value)?, {TResult fromARGB(int a, int r, int g, int b)?, TResult fromRGBO(int r, int g, int b, double opacity)?, TResult alphaBlend(Color foreground, Color background)?, TResult material(int value, Map< int, Color> swatch)?, TResult materialAccentColor(int value, Map<int, Color> swatch)?, TResult primary()?, TResult onPrimary()?, TResult primaryContainer()?, TResult onPrimaryContainer()?, TResult secondary()?, TResult onSecondary()?, TResult secondaryContainer()?, TResult onSecondaryContainer()?, TResult tertiary()?, TResult onTertiary()?, TResult tertiaryContainer()?, TResult onTertiaryContainer()?, TResult error()?, TResult onError()?, TResult errorContainer()?, TResult onErrorContainer()?, TResult outline()?, TResult outlineVariant()?, TResult background()?, TResult onBackground()?, TResult surface()?, TResult onSurface()?, TResult surfaceVariant()?, TResult onSurfaceVariant()?, TResult inverseSurface()?, TResult onInverseSurface()?, TResult inversePrimary()?, TResult shadow()?, TResult scrim()?, TResult surfaceTint()?, required TResult orElse()}) → TResult -
@optionalTypeArgs, inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
TResult extends Object?> (TResult $default(int value), {required TResult fromARGB(int a, int r, int g, int b), required TResult fromRGBO(int r, int g, int b, double opacity), required TResult alphaBlend(Color foreground, Color background), required TResult material(int value, Map< int, Color> swatch), required TResult materialAccentColor(int value, Map<int, Color> swatch), required TResult primary(), required TResult onPrimary(), required TResult primaryContainer(), required TResult onPrimaryContainer(), required TResult secondary(), required TResult onSecondary(), required TResult secondaryContainer(), required TResult onSecondaryContainer(), required TResult tertiary(), required TResult onTertiary(), required TResult tertiaryContainer(), required TResult onTertiaryContainer(), required TResult error(), required TResult onError(), required TResult errorContainer(), required TResult onErrorContainer(), required TResult outline(), required TResult outlineVariant(), required TResult background(), required TResult onBackground(), required TResult surface(), required TResult onSurface(), required TResult surfaceVariant(), required TResult onSurfaceVariant(), required TResult inverseSurface(), required TResult onInverseSurface(), required TResult inversePrimary(), required TResult shadow(), required TResult scrim(), required TResult surfaceTint()}) → TResult -
@optionalTypeArgs, inherited
-
whenOrNull<
TResult extends Object?> (TResult? $default(int value)?, {TResult? fromARGB(int a, int r, int g, int b)?, TResult? fromRGBO(int r, int g, int b, double opacity)?, TResult? alphaBlend(Color foreground, Color background)?, TResult? material(int value, Map< int, Color> swatch)?, TResult? materialAccentColor(int value, Map<int, Color> swatch)?, TResult? primary()?, TResult? onPrimary()?, TResult? primaryContainer()?, TResult? onPrimaryContainer()?, TResult? secondary()?, TResult? onSecondary()?, TResult? secondaryContainer()?, TResult? onSecondaryContainer()?, TResult? tertiary()?, TResult? onTertiary()?, TResult? tertiaryContainer()?, TResult? onTertiaryContainer()?, TResult? error()?, TResult? onError()?, TResult? errorContainer()?, TResult? onErrorContainer()?, TResult? outline()?, TResult? outlineVariant()?, TResult? background()?, TResult? onBackground()?, TResult? surface()?, TResult? onSurface()?, TResult? surfaceVariant()?, TResult? onSurfaceVariant()?, TResult? inverseSurface()?, TResult? onInverseSurface()?, TResult? inversePrimary()?, TResult? shadow()?, TResult? scrim()?, TResult? surfaceTint()?}) → TResult? -
@optionalTypeArgs, inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited