import 'package:flutter/material.dart';
import 'package:photo_view/photo_view.dart';
import 'package:supplier_new/common/settings.dart';

class ImageZoomPage extends StatefulWidget {
  var imageName;
  var imageDetails;
  ImageZoomPage({this.imageName,this.imageDetails});


  @override
  State<ImageZoomPage> createState() => _ImageZoomPageState();
}

class _ImageZoomPageState extends State<ImageZoomPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.white,
      appBar: AppSettings.appBarWithoutActions(widget.imageName),
      body: Container(
          //width: MediaQuery.of(context).size.width * .10,
          //height: MediaQuery.of(context).size.height * .50,
          child: PhotoView(
            imageProvider: NetworkImage(widget.imageDetails) as ImageProvider,
            maxScale: PhotoViewComputedScale.contained * 4.0,
            minScale: PhotoViewComputedScale.contained,
            initialScale: PhotoViewComputedScale.contained,
            basePosition: Alignment.center,

          )
      ),

    );
  }
}
