Nicer icon for reply swipes

pull/2269/head
Steven Lageveen 2 weeks ago
parent da7b9a37af
commit 0385928b5e

@ -198,11 +198,12 @@ class Message extends StatelessWidget {
child: ReplySwipe(
key: ValueKey(event.eventId),
backgroundBuilder: (context, direction, progress) => Padding(
padding: const EdgeInsets.symmetric(horizontal: 12.0),
child: Center(
padding: const EdgeInsets.only(right: 20.0),
child: Align(
alignment: Alignment.centerRight,
child: Opacity(
opacity: progress,
child: const Icon(Icons.check_outlined),
child: const Icon(Icons.reply_outlined),
),
),
),

@ -23,7 +23,6 @@ class ReplySwipe extends StatefulWidget {
this.maxDragPx = 96.0,
this.hapticOnThreshold = true,
this.backgroundBuilder,
this.allowedPointerKinds, // optional filter (e.g., {touch, trackpad})
});
final Widget child;
@ -34,10 +33,6 @@ class ReplySwipe extends StatefulWidget {
final bool hapticOnThreshold;
final ReplyBackgroundBuilder? backgroundBuilder;
/// Optional: restrict which input devices can trigger the drag (passes to
/// recognizer.supportedDevices). If null, uses Flutter's default.
final Set<PointerDeviceKind>? allowedPointerKinds;
@override
State<ReplySwipe> createState() => _ReplySwipeState();
}
@ -113,8 +108,6 @@ class _ReplySwipeState extends State<ReplySwipe>
onAccepted: () {}, // hook if needed
),
(rec) {
// Optional: restrict devices like Swipeable.allowedPointerKinds
rec.supportedDevices = widget.allowedPointerKinds;
rec.allowedSign = allowedSign;
rec

Loading…
Cancel
Save