LiquidGlassWidgets class
Entry point and configuration for the Liquid Glass Widgets library.
Setup
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await LiquidGlassWidgets.initialize(); // pre-warms shaders
runApp(LiquidGlassWidgets.wrap(
child: const MyApp(),
adaptiveQuality: true,
theme: GlassThemeData(
light: GlassThemeVariant(settings: GlassThemeSettings(blur: 10)),
dark: GlassThemeVariant(settings: GlassThemeSettings(blur: 14)),
),
));
}
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
- globalSettings ↔ LiquidGlassSettings?
-
Global LiquidGlassSettings override for the entire application.
getter/setter pair
- respectsAccessibility ↔ bool
-
Deprecated — use respectSystemAccessibility instead.
getter/setter pair
- respectSystemAccessibility ↔ bool
-
Whether glass widgets automatically respect system accessibility settings
(Reduce Motion, Reduce Transparency / High Contrast).
getter/setter pair
Static Methods
-
initialize(
{bool enablePerformanceMonitor = true, bool warmUpImpellerPipeline = true, GlassQualityPersistence? qualityPersistence}) → Future< void> - Initializes platform-level resources for the Liquid Glass library.
-
wrap(
{required Widget child, GlassThemeData? theme, bool respectSystemAccessibility = true, bool adaptiveQuality = false, GlassAdaptiveScopeConfig? adaptiveConfig, GlassQualityPersistence? qualityPersistence, Brightness? brightnessResolver(BuildContext)?}) → Widget -
Wraps
childin the Liquid Glass infrastructure scopes and applies all behavioral configuration.