Fix image order.

Close #159
This commit is contained in:
2025-01-31 13:11:04 +08:00
parent 0b9f0b7d35
commit e2c69d882f

View File

@@ -228,6 +228,8 @@ class _GalleryModeState extends State<_GalleryMode>
? Axis.vertical
: Axis.horizontal;
bool reverse = reader.mode == ReaderMode.galleryRightToLeft;
List<Widget> imageWidgets = images.map((imageKey) {
ImageProvider imageProvider =
_createImageProviderFromKey(imageKey, context);
@@ -239,6 +241,10 @@ class _GalleryModeState extends State<_GalleryMode>
);
}).toList();
if (reverse) {
imageWidgets = imageWidgets.reversed.toList();
}
return axis == Axis.vertical
? Column(children: imageWidgets)
: Row(children: imageWidgets);