Scrim class final
A translucent layer that makes content legible over AnyBackground.
- Available extensions
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- isNeeded → bool
-
no setter
- meetsTarget → bool
-
False means no opacity of scrimArgb reaches the target; opacity is
then a best effort, 1.0. Check before trusting: drop a custom scrim
color, or revisit the design. Don't ship it silently.
final
- mixedPolarityRejected → bool
-
True when a lower opacity passed per pixel but left pixels on both
sides of the content, e.g. mid-gray text on a black and white
checkerboard. That reads badly, so the solve kept going until every
pixel sat on one side. Nothing to act on; explains the extra cost.
final
- opacity → double
-
0..1, quantized to 1/255 so 8-bit compositing is exact.
final
- paintArgb → int
-
scrimArgb with opacity as its alpha. Fill a rect with it.
no setter
- paintColor → Color
-
Available on Scrim, provided by the ScrimFlutter extension
Scrim.paintArgb as a Color: fill a rect behind the content.no setter - polarity → Polarity
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrimArgb → int
-
The scrim's color: black or white, or the caller's choice.
final
- worstContrast → double
-
Weakest absolute contrast over every pixel at opacity.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
shadows(
{required double blurRadius, double contentRadius = -1.0, int maxLayers = 8}) → Shadows - Draw this scrim as stacked blurred copies of the glyph, for renderers that can't widen it (Flutter text Shadow, CSS text-shadow). Approximate; prefer shadowsWithStroke.
-
shadowsWithStroke(
{double stroke = 1.0, double blurRadius = 4.0}) → ShadowsWithStroke -
Draw this scrim hugging the glyph: its shape widened by
strokepixels, then blurred byblurRadius, painted under it. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override