isSameColorSwatchAs<T> function
- ColorSwatch<
T> color, { - double threshold = colorEpsilon,
Asserts that the object represents the same color swatch as color
when
used to paint.
Specifically this matcher checks the object is of type ColorSwatch and its
color components fall below the delta specified by threshold
.
Note: This doesn't recurse into the swatches Color type, instead treating them as Colors.
Implementation
Matcher isSameColorSwatchAs<T>(ColorSwatch<T> color,
{double threshold = colorEpsilon}) {
return _ColorSwatchMatcher<T>(color, threshold);
}