I want to make swipable image viewer and have InteractiveViewer
inside PageView.builder
.
class PageViewImageSwiper extends StatelessWidget {
final List<Image> images;
const PageViewImageSwiper({required this.images, super.key});
@override
Widget build(BuildContext context) {
// Need logic to make it true when two or more fingers on the screen
bool _swipeDisabled = false;
return Scaffold(
body: Column(
children: [
Expanded(
child: PageView.builder(
physics: _swipeDisabled ? NeverScrollableScrollPhysics() : null,
itemBuilder: (context, count) => InteractiveViewer(
child: images[count],
),
),
)
],
));
}
}
But they conflicting and i want to disable PageView scroll when have two fingers on the screen.