-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It is conflict with TabBar&TabBarView #10
Comments
I guess you should implement your own |
Has the problem been solved now? |
Workaround is 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();
});
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It is conflict with TabBar&TabBarView。
It is conflict with ListView( scrollDirection : Axis.horizontal)。
The text was updated successfully, but these errors were encountered: