BaseDrawer.percent constructor

const BaseDrawer.percent({
  1. Key? key,
  2. Duration duration = _drawerTransitionDuration,
  3. AxisDirection axisDirection = AxisDirection.right,
  4. Color backgroundColor = _drawerBackgroundColor,
  5. required double? percent,
  6. required Widget child,
  7. Curve curve = Curves.linearToEaseOut,
  8. Curve reverseCurve = Curves.linearToEaseOut,
  9. bool allowGesture = true,
  10. bool allowMultipleGesture = false,
  11. bool barrierDismissible = true,
  12. bool enableLiquidGlass = true,
  13. double glassOpacity = 0.9,
  14. double reflectionIntensity = 0.7,
  15. double refractionStrength = 0.5,
  16. bool adaptiveInteraction = true,
  17. bool hapticFeedback = true,
})

Specify percentage

Implementation

const BaseDrawer.percent({
  Key? key,
  this.duration = _drawerTransitionDuration,
  this.axisDirection = AxisDirection.right,
  this.backgroundColor = _drawerBackgroundColor,
  required this.percent,
  required this.child,
  this.curve = Curves.linearToEaseOut,
  this.reverseCurve = Curves.linearToEaseOut,
  this.allowGesture = true,
  this.allowMultipleGesture = false,
  this.barrierDismissible = true,
  // iOS 26 Liquid Glass Dynamic Material properties
  this.enableLiquidGlass = true,
  this.glassOpacity = 0.9,
  this.reflectionIntensity = 0.7,
  this.refractionStrength = 0.5,
  this.adaptiveInteraction = true,
  this.hapticFeedback = true,
})  : size = null,
      assert(percent != null && percent > 0 && percent <= 100),
      assert(child != null),
      super(key: key);