File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
packages/based_split_view Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 1+ ## 1.2.2
2+
3+ 🔧Drop 1.2.1 Changes
4+
15## 1.2.1
26
37📖Update README.md to fix broken links
Original file line number Diff line number Diff line change @@ -106,10 +106,10 @@ class _BasedSplitViewState extends State<BasedSplitView> {
106106
107107 if (singleView) {
108108 return Navigator (
109+ onPopPage: _onPopPage,
109110 key: widget.navigatorKey,
110111 pages: [
111112 CupertinoPage (
112- canPop: false ,
113113 child: widget.leftWidget,
114114 ),
115115 ],
@@ -121,9 +121,9 @@ class _BasedSplitViewState extends State<BasedSplitView> {
121121 final rightWidget = ScaffoldMessenger (
122122 child: Navigator (
123123 key: widget.navigatorKey,
124+ onPopPage: _onPopPage,
124125 pages: [
125126 CupertinoPage (
126- canPop: false ,
127127 child: Center (
128128 child: widget.rightPlaceholder,
129129 ),
@@ -185,4 +185,10 @@ class _BasedSplitViewState extends State<BasedSplitView> {
185185
186186 return clampDouble (leftWidth, min, max);
187187 }
188+
189+ bool _onPopPage (Route <dynamic > route, dynamic result) {
190+ /// Prevent to pop root page
191+ if (route.isFirst) return false ;
192+ return route.didPop (result);
193+ }
188194}
You can’t perform that action at this time.
0 commit comments