import 'package:flutter/material.dart'; import 'package:doctor/common/settings.dart'; import 'package:photo_view/photo_view.dart'; class ImageZoomPage extends StatefulWidget { var imageName; var imageDetails; ImageZoomPage({this.imageName,this.imageDetails}); @override State createState() => _ImageZoomPageState(); } class _ImageZoomPageState extends State { @override Widget build(BuildContext context) { return Scaffold( appBar:AppBar( backgroundColor: primaryColor, title: Text(widget.imageName), actions: [ IconButton( onPressed: () { Navigator.pop(context); }, icon: Icon( Icons.cancel, color: buttonColors, size: 30, ), ), ], ), body: Container( //width: MediaQuery.of(context).size.width * .10, //height: MediaQuery.of(context).size.height * .50, child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding(padding:EdgeInsets.fromLTRB(10,10,10,0), child: Text('Use two fingers to zoom/double tap',style: TextStyle(color: Colors.black,fontSize: 12),),), SizedBox(height:MediaQuery.of(context).size.height * .02,), Expanded( child: PhotoView( imageProvider: NetworkImage(widget.imageDetails) as ImageProvider, maxScale: PhotoViewComputedScale.contained * 4.0, minScale: PhotoViewComputedScale.contained, initialScale: PhotoViewComputedScale.contained, basePosition: Alignment.center, ), ) ], ) ), ); } }