GlassSwipeActions constructor

const GlassSwipeActions({
  1. Key? key,
  2. required Widget child,
  3. List<GlassSwipeAction> leadingActions = const [],
  4. List<GlassSwipeAction> trailingActions = const [],
  5. bool allowsFullSwipe = true,
  6. double fullSwipeThreshold = 0.65,
  7. double? actionWidth,
  8. double buttonDiameter = 50.0,
  9. double buttonSpacing = 12.0,
  10. double horizontalPadding = 12.0,
  11. BorderRadiusGeometry? borderRadius,
  12. GlassSwipeController? controller,
  13. ValueChanged<GlassSwipeState>? onSwipeStateChanged,
  14. bool enableHaptics = true,
  15. bool closeOnTapOutside = true,
  16. Clip clipBehavior = Clip.antiAlias,
  17. GlassSwipeActionStyle style = GlassSwipeActionStyle.tintedGlass,
  18. VoidCallback? onDismissed,
})

Creates a swipeable action container.

Implementation

const GlassSwipeActions({
  super.key,
  required this.child,
  this.leadingActions = const [],
  this.trailingActions = const [],
  this.allowsFullSwipe = true,
  this.fullSwipeThreshold = 0.65,
  this.actionWidth,
  this.buttonDiameter = 50.0,
  this.buttonSpacing = 12.0,
  this.horizontalPadding = 12.0,
  this.borderRadius,
  this.controller,
  this.onSwipeStateChanged,
  this.enableHaptics = true,
  this.closeOnTapOutside = true,
  this.clipBehavior = Clip.antiAlias,
  this.style = GlassSwipeActionStyle.tintedGlass,
  this.onDismissed,
}) : assert(fullSwipeThreshold > 0.0 && fullSwipeThreshold <= 1.0,
          'fullSwipeThreshold must be between 0.0 and 1.0');