💄 Optimized image browsing

This commit is contained in:
LittleSheep 2024-03-24 11:20:59 +08:00
parent 41f456893f
commit e74aba2d8b
2 changed files with 3 additions and 2 deletions

View File

@ -51,15 +51,15 @@ class FeedItem extends StatelessWidget {
child: FlutterCarousel(
options: CarouselOptions(
height: 240.0,
viewportFraction: 1.0,
showIndicator: true,
slideIndicator: const CircularSlideIndicator(),
),
items: item.attachments?.map((x) {
return Builder(
builder: (BuildContext context) {
return Container(
return SizedBox(
width: MediaQuery.of(context).size.width,
margin: const EdgeInsets.symmetric(horizontal: 5.0),
child: InkWell(
child: Image.network(
getFileUrl(x.fileId),

View File

@ -12,6 +12,7 @@ class ImageLightbox extends StatelessWidget {
child: Center(
child: SizedBox(
height: MediaQuery.of(context).size.height,
width: MediaQuery.of(context).size.width,
child: InteractiveViewer(
boundaryMargin: const EdgeInsets.all(128),
minScale: 0.1,