
import 'package:flutter/material.dart';
import 'package:photo_view/photo_view.dart';

class ImageViewer extends StatefulWidget {
  final Key? key;
  final ImageProvider imageProvider;

  ImageViewer(this.imageProvider, {this.key}) :
      super(key: key);

  @override
  State<StatefulWidget> createState() {
    return ImageViewState();
  }

}

class ImageViewState extends State<ImageViewer> {
  @override
  Widget build(BuildContext context) {
    return Container(
      width: MediaQuery.of(context).size.width - 100.0,
      height: MediaQuery.of(context).size.height - 120.0,
      child: PhotoView(
        imageProvider: widget.imageProvider,
      ),
    );
  }

}