GlassAdaptiveScope constructor
const
GlassAdaptiveScope({
- required Widget child,
- GlassQuality minQuality = GlassQuality.minimal,
- GlassQuality maxQuality = GlassQuality.premium,
- GlassQuality? initialQuality,
- int targetFrameMs = 16,
- bool allowStepUp = true,
- double warmupPremiumThresholdMs = 20.0,
- double warmupStandardThresholdMs = 28.0,
- bool frostStep = false,
- double? minimalOpacity,
- void onQualityChanged(
- GlassQuality from,
- GlassQuality to
- void onDiagnostic()?,
- bool debugLogDiagnostics = false,
- Key? key,
Creates a GlassAdaptiveScope.
child is required. All other parameters have sensible defaults.
Implementation
const GlassAdaptiveScope({
required this.child,
this.minQuality = GlassQuality.minimal,
this.maxQuality = GlassQuality.premium,
this.initialQuality,
this.targetFrameMs = 16,
this.allowStepUp = true,
this.warmupPremiumThresholdMs = 20.0,
this.warmupStandardThresholdMs = 28.0,
this.frostStep = false,
this.minimalOpacity,
this.onQualityChanged,
this.onDiagnostic,
this.debugLogDiagnostics = false,
super.key,
}) : assert(
minimalOpacity == null ||
(minimalOpacity >= 0.0 && minimalOpacity <= 1.0),
'minimalOpacity must be between 0.0 and 1.0.',
);