update as grid image view

master
张萌 3 years ago
parent 71c18b4288
commit 65f84fd639

@ -1,5 +1,6 @@
import 'dart:io'; import 'dart:io';
import 'package:ansu_ui/ansu_ui.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -30,9 +31,18 @@ class AsGridImageView extends StatelessWidget {
shrinkWrap: true, shrinkWrap: true,
children: files == null children: files == null
? nets! ? nets!
.map((e) => FadeInImage.assetNetwork( .map((e) => Hero(
placeholder: placeholder ?? '', image: e)) tag: e,
child: PhotoViewer.toNet(
tag: e,
net: e,
),
))
.toList() .toList()
: files!.map((e) => Image.file(e)).toList()); : files!
.map((e) => Hero(
tag: e.path,
child: PhotoViewer.toFile(tag: e.path, file: e)))
.toList());
} }
} }

Loading…
Cancel
Save