colorMode property

ColorMode get colorMode

Capability profile installed in the ambient MediaQuery. Tests set glyphTier to GlyphTier.ascii to exercise the ASCII drawing fallback, or images to InlineImageSupport.placements to exercise the true-pixel image path.

Like viewportSize, a change after the first pumpWidget flows into the ambient MediaQuery and rebuilds dependents, so a mid-test capability switch engages (e.g. the ASCII drawing fallback) exactly as a live capability change would.

Implementation

ColorMode get colorMode => _colorMode;
set colorMode (ColorMode value)

Implementation

set colorMode(ColorMode value) {
  if (value == _colorMode) return;
  _colorMode = value;
  _refreshSurface();
}