From 760be79153184f819e73ccf94ccae0f6758527f4 Mon Sep 17 00:00:00 2001 From: Vishesh Handa Date: Sat, 26 Sep 2020 05:38:13 +0200 Subject: [PATCH] GraphView: Try using the InteractiveViewer Using two SingleChildScrollView hijacks the touch events and the underlying widget never gets it. The InteractiveViewer seems to be as useless. --- lib/screens/graph_view.dart | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/lib/screens/graph_view.dart b/lib/screens/graph_view.dart index e8b878cc..158217dd 100644 --- a/lib/screens/graph_view.dart +++ b/lib/screens/graph_view.dart @@ -112,24 +112,32 @@ class _GraphViewState extends State { children.add(w); } + var view = Container( + width: 2500, + height: 2500, + child: Stack( + children: children, + fit: StackFit.expand, + ), + ); + + return InteractiveViewer( + child: view, + ); + + /* return Scrollbar( child: SingleChildScrollView( child: Scrollbar( child: SingleChildScrollView( - child: Container( - width: 2500, - height: 2500, - child: Stack( - children: children, - fit: StackFit.expand, - ), - ), + child: view, scrollDirection: Axis.horizontal, ), ), scrollDirection: Axis.vertical, ), ); + */ } }