优化图片预览显示效果

hmxc
小赖 4 years ago
parent ee499642b9
commit fe080e3781

@ -46,11 +46,11 @@ class _BeeImagePreviewState extends State<BeeImagePreview> {
backgroundColor: Colors.black54, backgroundColor: Colors.black54,
body: BackdropFilter( body: BackdropFilter(
filter: ImageFilter.blur(sigmaX: 5, sigmaY: 5), filter: ImageFilter.blur(sigmaX: 5, sigmaY: 5),
child: Center( child: InteractiveViewer(
child: InteractiveViewer( boundaryMargin: EdgeInsets.all(48),
minScale: 0.2, minScale: 0.2,
child: image, maxScale: 10,
), child: Center(child: image),
), ),
), ),
), ),

@ -16,6 +16,7 @@ class BeeGridImageView extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
if (urls.isEmpty) return SizedBox();
return GridView.builder( return GridView.builder(
padding: padding, padding: padding,
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(

Loading…
Cancel
Save