GlassShaders class
Loads and holds Glisse's shader. Widgets draw a fallback until it's ready.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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
Static Properties
- canRecordImages → bool
-
Whether glass may record pictures into images: for a backdrop's copy,
and for a control's lens over its own content. False only in a browser
that blocks reading canvases back, such as Firefox or LibreWolf with
privacy.resistFingerprinting, where CanvasKit fails insidetoImageSyncand breaks every draw after it. There, glass frosts with the browser's own blur, and controls lift without their lens.no setter - debugCanRecordImagesOverride ↔ bool?
-
Overrides canRecordImages, for tests.
getter/setter pair
- debugUsableOverride ↔ bool?
-
Overrides usable, for tests.
getter/setter pair
- error → Object?
-
Why loading failed, if it did.
no setter
- program → FragmentProgram?
-
The compiled program, once loaded.
no setter
-
ready
→ ValueNotifier<
bool> -
Whether the shader has loaded.
final
- usable → bool
-
Whether glass may use its shader at all. False only in a browser
without WebGL, where Flutter draws on the CPU and the shader would take
seconds a frame; glass paints as a plain tint and rim there.
no setter
Static Methods
-
create(
) → FragmentShader? - A new shader from the loaded program, or null while it is still loading (this starts the load).
-
load(
) → Future< FragmentProgram?> - Loads the shader. Safe to call any number of times; after a failure, the next call tries again.
-
precache(
) → Future< void> - Loads the shader before the first frame, so glass refracts from the start. Optional: glass loads it on its own and frosts until then.