mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-10 19:48:56 +03:30
fix image issue for test result
This commit is contained in:
@@ -2,6 +2,7 @@ import 'package:carousel_slider/carousel_slider.dart';
|
||||
import 'package:cssd/config/colors.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:pinch_zoom/pinch_zoom.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
class DatasBox extends StatelessWidget {
|
||||
@@ -249,17 +250,32 @@ class DatasBox extends StatelessWidget {
|
||||
child: CarouselSlider.builder(
|
||||
disableGesture: true,
|
||||
itemBuilder: (ctx, index, realIndex) {
|
||||
return Image(image: NetworkImage(datas['files'][index]));
|
||||
return InkWell(
|
||||
child: Image(
|
||||
image: NetworkImage(datas['files'][index])
|
||||
),
|
||||
onTap: () {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) => PinchZoom(
|
||||
child: Image.network(datas['files'][index])
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
itemCount: datas['files'].length,
|
||||
options: CarouselOptions(
|
||||
enlargeCenterPage: false,
|
||||
aspectRatio: 1,
|
||||
viewportFraction: 1,
|
||||
enlargeCenterPage: true,
|
||||
aspectRatio: 16/8,
|
||||
viewportFraction: datas['files'].length == 1 ? 1 : 0.6,
|
||||
padEnds: false,
|
||||
pauseAutoPlayOnTouch: true,
|
||||
disableCenter: false,
|
||||
autoPlay: false,
|
||||
enlargeFactor: 0.5,
|
||||
enableInfiniteScroll:
|
||||
datas['files'].length == 1 ? false : true,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user