GlassSwipeActions constructor

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

Creates a swipeable action container.

Implementation

const GlassSwipeActions({
  super.key,
  required this.child,
  this.leadingActions = const [],
  this.trailingActions = const [],
  this.enabled = true,
  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.backgroundColor,
  this.onDismissed,
}) : assert(fullSwipeThreshold > 0.0 && fullSwipeThreshold <= 1.0,
          'fullSwipeThreshold must be between 0.0 and 1.0');