feat: Swipe to next or previous image in image viewer
This commit is contained in:
parent
234998a46e
commit
fb685c03cf
5 changed files with 142 additions and 64 deletions
|
|
@ -19,6 +19,7 @@ class ImageBubble extends StatelessWidget {
|
|||
final double height;
|
||||
final void Function()? onTap;
|
||||
final BorderRadius? borderRadius;
|
||||
final Timeline? timeline;
|
||||
|
||||
const ImageBubble(
|
||||
this.event, {
|
||||
|
|
@ -32,6 +33,7 @@ class ImageBubble extends StatelessWidget {
|
|||
this.animated = false,
|
||||
this.onTap,
|
||||
this.borderRadius,
|
||||
this.timeline,
|
||||
super.key,
|
||||
});
|
||||
|
||||
|
|
@ -62,6 +64,7 @@ class ImageBubble extends StatelessWidget {
|
|||
context: context,
|
||||
builder: (_) => ImageViewer(
|
||||
event,
|
||||
timeline: timeline,
|
||||
outerContext: context,
|
||||
),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -396,6 +396,7 @@ class Message extends StatelessWidget {
|
|||
textColor: textColor,
|
||||
onInfoTab: onInfoTab,
|
||||
borderRadius: borderRadius,
|
||||
timeline: timeline,
|
||||
),
|
||||
if (event.hasAggregatedEvents(
|
||||
timeline,
|
||||
|
|
|
|||
|
|
@ -28,11 +28,13 @@ class MessageContent extends StatelessWidget {
|
|||
final Color textColor;
|
||||
final void Function(Event)? onInfoTab;
|
||||
final BorderRadius borderRadius;
|
||||
final Timeline timeline;
|
||||
|
||||
const MessageContent(
|
||||
this.event, {
|
||||
this.onInfoTab,
|
||||
super.key,
|
||||
required this.timeline,
|
||||
required this.textColor,
|
||||
required this.borderRadius,
|
||||
});
|
||||
|
|
@ -137,6 +139,7 @@ class MessageContent extends StatelessWidget {
|
|||
height: height,
|
||||
fit: fit,
|
||||
borderRadius: borderRadius,
|
||||
timeline: timeline,
|
||||
);
|
||||
case CuteEventContent.eventType:
|
||||
return CuteContent(event);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue