I am zoom a image inside interactive viewer , interactive viewer is a child of container ,set some height to container,after zoom a image, particular position in viewport ,i cant scroll and zoom a image
class MyApp extends StatelessWidget {
static const String _title = 'Flutter Code Sample';
@override
Widget build(BuildContext context) {
return MaterialApp(
title: _title,
home: Scaffold(
appBar: AppBar(title: const Text(_title)),
body: Zoom(),
),
);
}
}
class Zoom extends StatefulWidget
{
@override
MyStatelessWidget createState()=> MyStatelessWidget();
}
/// This is the stateless widget that the main application instantiates.
class MyStatelessWidget extends State<Zoom> {
@override
Widget build(BuildContext context) {
return Center(
child:Container(height: 300,
child: InteractiveViewer(
scaleEnabled: true,maxScale: 4.0,
child: Center(
child:Container( child:Image.asset('Assets/Java-001.jpg',fit: BoxFit.cover,alignment: Alignment.center,)),
),
)));
}
}
How can i resolve this problem?