Implementation
@override
DynamicColor get outline {
final color2025 = DynamicColor(
name: "outline",
palette: (scheme) => scheme.neutralPalette,
chromaMultiplier: (scheme) {
if (scheme.platform == .phone) {
if (scheme.variant == .neutral) {
return 2.2;
} else if (scheme.variant == .tonalSpot) {
return 1.7;
} else if (scheme.variant == .expressive) {
return Hct.isYellow(scheme.neutralPalette.hue)
? (scheme.isDark ? 3.0 : 2.3)
: 1.6;
}
}
return 1.0;
},
background: (scheme) {
if (scheme.platform == .phone) {
return scheme.isDark ? surfaceBright : surfaceDim;
} else {
return surfaceContainerHigh;
}
},
contrastCurve: (scheme) => scheme.platform == .phone
? _getContrastCurve(3)
: _getContrastCurve(4.5),
);
return super.outline.extendSpecVersion(SpecVersion.spec2025, color2025);
}