mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-13 18:08:56 +03:30
Fix image carousel
This commit is contained in:
@@ -374,13 +374,14 @@ class ItemDetailsDataBox extends StatelessWidget {
|
|||||||
},
|
},
|
||||||
itemCount: datas.filePath!.length,
|
itemCount: datas.filePath!.length,
|
||||||
options: CarouselOptions(
|
options: CarouselOptions(
|
||||||
enlargeCenterPage: false,
|
enlargeCenterPage: true,
|
||||||
aspectRatio: 1,
|
aspectRatio: 16/8,
|
||||||
viewportFraction: 1,
|
viewportFraction: datas.filePath?.length == 1 ? 1 : 0.6,
|
||||||
padEnds: false,
|
padEnds: false,
|
||||||
pauseAutoPlayOnTouch: true,
|
pauseAutoPlayOnTouch: true,
|
||||||
disableCenter: false,
|
disableCenter: false,
|
||||||
autoPlay: false,
|
autoPlay: false,
|
||||||
|
enlargeFactor: 0.5,
|
||||||
enableInfiniteScroll:
|
enableInfiniteScroll:
|
||||||
datas.filePath?.length == 1 ? false : true,
|
datas.filePath?.length == 1 ? false : true,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import 'package:cssd/widgets/MyItemsScreens/Detail/cancel_transfer_button.dart';
|
|||||||
import 'package:cssd/widgets/MyItemsScreens/Detail/transfer_destroy_button.dart';
|
import 'package:cssd/widgets/MyItemsScreens/Detail/transfer_destroy_button.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
|
import 'package:pinch_zoom/pinch_zoom.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
|
|
||||||
@@ -364,17 +365,32 @@ class MyItemsDetailsDataBox extends StatelessWidget {
|
|||||||
child: CarouselSlider.builder(
|
child: CarouselSlider.builder(
|
||||||
disableGesture: true,
|
disableGesture: true,
|
||||||
itemBuilder: (ctx, index, realIndex) {
|
itemBuilder: (ctx, index, realIndex) {
|
||||||
return Image(image: NetworkImage(datas.filePath![index]));
|
return InkWell(
|
||||||
|
child: Image(
|
||||||
|
image: NetworkImage(datas.filePath![index])
|
||||||
|
),
|
||||||
|
onTap: () {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context) => PinchZoom(
|
||||||
|
child: Image.network(datas.filePath![index])
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
},
|
},
|
||||||
itemCount: datas.filePath!.length,
|
itemCount: datas.filePath!.length,
|
||||||
options: CarouselOptions(
|
options: CarouselOptions(
|
||||||
enlargeCenterPage: false,
|
enlargeCenterPage: true,
|
||||||
aspectRatio: 1,
|
aspectRatio: 16/8,
|
||||||
viewportFraction: 1,
|
viewportFraction: datas.filePath?.length == 1 ? 1 : 0.6,
|
||||||
padEnds: false,
|
padEnds: false,
|
||||||
pauseAutoPlayOnTouch: true,
|
pauseAutoPlayOnTouch: true,
|
||||||
disableCenter: false,
|
disableCenter: false,
|
||||||
autoPlay: false,
|
autoPlay: false,
|
||||||
|
enlargeFactor: 0.5,
|
||||||
|
enableInfiniteScroll:
|
||||||
|
datas.filePath?.length == 1 ? false : true,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user