GlassContentAwareScope constructor
const
GlassContentAwareScope({})
Creates a content-aware brightness scope.
Implementation
const GlassContentAwareScope({
required this.child,
this.sampleInterval = const Duration(milliseconds: 180),
this.flipDuration = const Duration(milliseconds: 200),
this.flipCurve = Curves.easeInOut,
this.lightToDarkThreshold = 0.6,
this.darkToLightThreshold = 0.6,
this.backgroundColor,
super.key,
}) : assert(
lightToDarkThreshold >= 0.5 && lightToDarkThreshold <= 1.0,
'lightToDarkThreshold must be within [0.5, 1.0]',
),
assert(
darkToLightThreshold >= 0.5 && darkToLightThreshold <= 1.0,
'darkToLightThreshold must be within [0.5, 1.0]',
);