GlassAdaptiveScope constructor

const GlassAdaptiveScope({
  1. required Widget child,
  2. GlassQuality minQuality = GlassQuality.minimal,
  3. GlassQuality maxQuality = GlassQuality.premium,
  4. GlassQuality? initialQuality,
  5. int targetFrameMs = 16,
  6. bool allowStepUp = true,
  7. double warmupPremiumThresholdMs = 20.0,
  8. double warmupStandardThresholdMs = 28.0,
  9. void onQualityChanged(
    1. GlassQuality from,
    2. GlassQuality to
    )?,
  10. void onDiagnostic(
    1. GlassAdaptiveDiagnostic
    )?,
  11. bool debugLogDiagnostics = false,
  12. 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.onQualityChanged,
  this.onDiagnostic,
  this.debugLogDiagnostics = false,
  super.key,
});