FresnelPlatform class abstract
The contract every platform implementation of Fresnel satisfies.
The default instance is a no-op that reports no native glass, so the façade
falls through to the shader renderer on any platform without a registered
implementation. fresnel_ios replaces instance at registration time.
- Inheritance
-
- Object
- PlatformInterface
- FresnelPlatform
Constructors
- FresnelPlatform()
-
Constructs an implementation. Subclasses must call this so
PlatformInterfacecan verify them — it is what stops an implementation from being faked withimplements.
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
-
buildNativeContainer(
{required List< GlassElement> elements, required double spacing, required Widget child}) → Widget? - Builds a single native surface hosting many glass shapes that share one sampling region, so they merge, morph and light consistently.
-
buildNativeGlass(
{required Glass glass, required GlassShape shape, required Widget child, String? morphId, bool isPressed = false}) → Widget? - Builds a platform view backed by the OS's own glass material.
-
capabilities(
) → Future< GlassCapabilities> - Resolves device capabilities. Implementations should answer natively and cache; the façade calls this once during initialisation.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
renderSymbol(
{required String name, required double size, required int colorArgb, double weight = 0.4}) → Future< Uint8List?> - Renders an SF Symbol to raw PNG bytes at the requested size.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance ↔ FresnelPlatform
-
The registered implementation, or a no-op that reports no native glass.
getter/setter pair