UIProSwipeableTile.swipeToTrigger constructor
const
UIProSwipeableTile.swipeToTrigger({
- required Key key,
- required Widget child,
- required BackgroundBuilder backgroundBuilder,
- required Color color,
- required SwipedCallback onSwiped,
- double swipeThreshold = 0.4,
- double borderRadius = 8.0,
- SwipeDirection direction = SwipeDirection.endToStart,
- Duration movementDuration = const Duration(milliseconds: 200),
- HitTestBehavior behavior = HitTestBehavior.opaque,
- bool isElevated = true,
Similar to UIProSwipeableTile but It doesn't allow dismiss instead you
can swipe until swipeThreshold also doesn't have confirmSwipe,
onSwiped, resizeDuration
The key argument must not be null because UIProSwipeableTiles are commonly
used in lists and removed from the list when swiped. Without keys, the
default behavior is to sync widgets based on their index in the list,
which means the item after the swiped item would be synced with the
state of the swiped item. Using keys causes the widgets to sync
according to their keys and avoids this pitfall.
Implementation
const UIProSwipeableTile.swipeToTrigger({
required Key key,
required this.child,
required this.backgroundBuilder,
required this.color,
required this.onSwiped,
this.swipeThreshold = 0.4,
this.borderRadius = 8.0,
this.direction = SwipeDirection.endToStart,
this.movementDuration = const Duration(milliseconds: 200),
this.behavior = HitTestBehavior.opaque,
this.isElevated = true,
}) : isCard = false,
horizontalPadding = 0,
verticalPadding = 1,
confirmSwipe = null,
// onSwiped = null,
resizeDuration = null,
swipeToTrigger = true,
shadow = const BoxShadow(color: Colors.black),
assert(swipeThreshold > 0.0 && swipeThreshold <= 0.5),
super(key: key);