This repository has been archived on 2024-06-08. You can view files and clone it, but cannot push or open issues or pull requests.
SolarAgent/lib/widgets/image.dart

31 lines
767 B
Dart
Raw Normal View History

2024-03-23 16:13:52 +00:00
import 'package:flutter/material.dart';
class ImageLightbox extends StatelessWidget {
final String url;
const ImageLightbox({super.key, required this.url});
@override
Widget build(BuildContext context) {
return Scaffold(
body: GestureDetector(
child: Center(
child: SizedBox(
height: MediaQuery.of(context).size.height,
2024-03-24 03:20:59 +00:00
width: MediaQuery.of(context).size.width,
2024-03-23 16:13:52 +00:00
child: InteractiveViewer(
boundaryMargin: const EdgeInsets.all(128),
minScale: 0.1,
maxScale: 16.0,
child: Image.network(url, fit: BoxFit.contain),
),
),
),
onTap: () {
Navigator.pop(context);
},
),
);
}
}