holdMeasurement static method
Suspends frame measurement for every GlassAdaptiveScope until the returned hold is released.
Wrap heavy work of your own that competes with the glass for the GPU/CPU, so the slowdown is not mistaken for a device that cannot render the glass:
final hold = GlassAdaptiveScope.holdMeasurement();
try {
await heavyWork();
} finally {
hold.release();
}
Implementation
static GlassMeasurementHold holdMeasurement() =>
GlassQualityAdapter.holdMeasurement();