update as grid image view

master
张萌 3 years ago
parent 65f84fd639
commit c4ffd5e326

@ -31,18 +31,23 @@ class AsGridImageView extends StatelessWidget {
shrinkWrap: true, shrinkWrap: true,
children: files == null children: files == null
? nets! ? nets!
.map((e) => Hero( .map((e) => GestureDetector(
tag: e, onTap: () => PhotoViewer.toNet(
child: PhotoViewer.toNet(
tag: e, tag: e,
net: e, net: e,
), ),
child: Hero(
tag: e,
child: FadeInImage.assetNetwork(
placeholder: placeholder ?? '', image: e),
),
)) ))
.toList() .toList()
: files! : files!
.map((e) => Hero( .map((e) => GestureDetector(
tag: e.path, onTap: () => PhotoViewer.toFile(tag: e.path, file: e),
child: PhotoViewer.toFile(tag: e.path, file: e))) child: Hero(tag: e.path, child: Image.file(e)),
))
.toList()); .toList());
} }
} }

Loading…
Cancel
Save