Quantcast
Channel: Active questions tagged listview - Stack Overflow
Viewing all articles
Browse latest Browse all 611

Vertical direction zooming not working when listview is wrapped with interactive viewer widget in flutter

$
0
0

Requirement: Needs to have pinch zooming/panning in all directions and scrolling with fling support

Issue faced: To achieve this scenario tried wrapping listview.builder with interactiveviewer, but in this case, only x-axis i.e. horizontal zooming alone works, unable to zoom in the y direction. I suspect while zooming vertically, the Listview widget's gesture wins. The reason for using listView is having n number of widgets/children. So is there any workaround to achieve my requirement, kindly assist me in this, thanks in advance. I have attached the code below which I have tried.

Also kindly let me know is there any other widgets in Flutter to achieve my functionality.

void main() {  runApp(const MyApp());}class MyApp extends StatelessWidget {  const MyApp({super.key});  @override  Widget build(BuildContext context) {    return MaterialApp(      home: Container(        color: Colors.red,        child: InteractiveViewer(          child: ListView.builder(            itemCount: 30,            itemBuilder: (context, index) {              return Image.network('https://images.pexels.com/photos/213780/pexels-photo-213780.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500',              );            },          ),        ),      ),    );  }}

Viewing all articles
Browse latest Browse all 611

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>