Comments (3)
I guess you should implement your own GestureArena
, like described in this article:
https://medium.com/koahealth/combining-multiple-gesturedetectors-in-flutter-26d899d008b2
from cupertino_back_gesture.
It is conflict with TabBar&TabBarView。
It is conflict with ListView( scrollDirection : Axis.horizontal)。
Has the problem been solved now?
from cupertino_back_gesture.
Workaround is RawGestureDetector
with hardcoded swipe zone.
child: RawGestureDetector(
gestures: {
AllowMultipleGestureRecognizer:
GestureRecognizerFactoryWithHandlers<
AllowMultipleGestureRecognizer>(
() => AllowMultipleGestureRecognizer(), //constructor
(AllowMultipleGestureRecognizer instance) {
instance.onCancel = () {
setState(() {
_tabPhysics = const ScrollPhysics();
});
};
instance.onDown = (position) {
setState(() {
/// 199 - it's magic left side zone on screen. I think it can be about 200-250 in my case it's ok.
if(_tabController!.index == 0 && position.localPosition.dx <= 199) {
_tabPhysics = const NeverScrollableScrollPhysics();
} else {
_tabPhysics = const ScrollPhysics();
}
});
};
},
)
},
child: TabBarView(
physics: _tabPhysics,
controller: _tabController,
children: tabs.map((tab) => AdvertListWidget(items: tab.items)).toList(),
),
)
//
class AllowMultipleGestureRecognizer extends VerticalDragGestureRecognizer
{
@override
void rejectGesture(int pointer) {
acceptGesture(pointer);
}
}
And in _tabController i change physics
_tabController!.addListener(() {
setState(() {
_tabPhysics = const ScrollPhysics();
});
});
from cupertino_back_gesture.
Related Issues (13)
- Allow the back gesture to not override any other gesture that is not in the same direction HOT 3
- Does it work with GetX? Or is there equivalent for GetX? HOT 4
- Null safety support? HOT 2
- extends MaterialPageRoute does not work HOT 2
- Is there a way to change the dismiss/pop animation HOT 1
- Does not work with MaterialApp.router HOT 1
- with onGenerateRoute HOT 2
- how to avoid this plugin's gesture?
- Is it only for material app?
- This library cannot use with WillPopScope HOT 2
- No license HOT 1
- Error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cupertino_back_gesture.