MorphGlassSurface class
One surface of a control in one frame, handed to a MorphGlassPainter.
Only some surfaces are Liquid Glass in iOS 27: bars, glass buttons, menus, popovers, alerts, floating sheets and the search capsule. The tracks of the segmented control, switch and slider and the stepper are plain fills and come with glass false; a painter draws them flat. A lens, knob or thumb is glass only while the finger lifts it: at lift 0 it is an opaque platter of color, and a painter turns it into glass as lift grows.
- Annotations
Constructors
-
MorphGlassSurface({required MorphGlassKind kind, required RRect shape, required Color color, required Brightness brightness, double lift = 0, double scaleX = 1, double scaleY = 1, MorphGlassOptics? optics, double? blurRadius, Color? tint, double transmissionGamma = 1, bool enabled = true, bool glass = true, double opacity = 1, MorphGlassGlow? glow, List<
BoxShadow> ? shadows, MorphGlassStyle? style}) -
Creates a surface description.
const
Properties
- blurRadius → double?
-
A measured backdrop blur radius overriding the material's preset,
in logical pixels. Null keeps the preset or lens optics.
final
- bounds → Rect
-
The box the surface occupies in the control's local coordinates.
no setter
- brightness → Brightness
-
The brightness the control resolved its colors for.
final
- color → Color
-
The flat fill the control would paint without a painter; a painter
uses it as the tint of its glass.
final
- enabled → bool
-
Whether the control accepts input.
final
- glass → bool
-
Whether the surface is Liquid Glass natively.
final
- glow → MorphGlassGlow?
-
The glow a finger raises on the surface, or null when it is not
lit.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- kind → MorphGlassKind
-
The role of the surface.
final
- lift → double
-
The lift progress, 0 resting and 1 fully lifted.
final
- localShape → RRect
-
The shape relative to bounds, for drawing inside a box placed
at bounds.
no setter
- opacity → double
-
How much of the surface shows, 0 to 1: a surface fading in or out,
such as a popover's platter while it opens.
final
- optics → MorphGlassOptics?
-
The refraction tuning of a lens surface, or null for a surface that
does not refract.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scaleX → double
-
The deformation along the track already applied to shape.
final
- scaleY → double
-
The deformation across the track already applied to shape.
final
-
shadows
→ List<
BoxShadow> ? -
Explicit exterior shadows for the liquid material.
Null retains the renderer's role preset.
final
- shape → RRect
-
The outline of the surface in the control's local coordinates,
deformation included.
final
- style → MorphGlassStyle?
-
The material the surface asks for, or null for the painter's own
default (
GlassBuiltInPainter.material).final - tint → Color?
-
The renderer's tint, separate from the fallback fill color. Null
uses color; a transparent tint keeps the material's neutral face.
final
- transmissionGamma → double
-
The display-referred gamma of transmitted backdrop luminance.
One keeps the material preset; emission is unaffected.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited