Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions lib/src/slidable.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,16 @@ class Slidable extends StatefulWidget {
this.direction = Axis.horizontal,
this.dragStartBehavior = DragStartBehavior.down,
this.useTextDirection = true,
this.onSlideAnimationChanged,
required this.child,
});

/// The Slidable widget controller.
final SlidableController? controller;

/// A callback that is called when the slide animation changes.
final Function(Animation<Offset> animation)? onSlideAnimationChanged;

/// Whether this slidable is interactive.
///
/// If false, the child will not slid to show actions.
Expand Down Expand Up @@ -214,6 +218,9 @@ class _SlidableState extends State<Slidable>
: Offset(0, end),
),
);
if (widget.onSlideAnimationChanged != null) {
widget.onSlideAnimationChanged!(moveAnimation);
}
}

Widget? get actionPane {
Expand Down