Skip to content
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

[IOS] swipe not working if the PDFView in a scrollable widget #265

Open
shehab0717 opened this issue Nov 17, 2023 · 2 comments
Open

[IOS] swipe not working if the PDFView in a scrollable widget #265

shehab0717 opened this issue Nov 17, 2023 · 2 comments

Comments

@shehab0717
Copy link

I have a SingleChildScrollView wrapping a Column one of its children is the PDFView, so when I try to swipe the pd (vertically or horizontally), it doesn't work on IOS device but it works fine on Android

@RitliRoland
Copy link

RitliRoland commented Dec 3, 2023

Same issue in android 14.0. There is the emulator properties (but I tried on a live tablet, same issue):
Properties
avd.ini.displayname 13.5 Freeform API 34
avd.ini.encoding UTF-8
AvdId 13.5_Freeform_API_34
disk.dataPartition.size 6442450944
display.settings.xml freeform
fastboot.chosenSnapshotFile
fastboot.forceChosenSnapshotBoot no
fastboot.forceColdBoot no
fastboot.forceFastBoot yes
hw.accelerometer yes
hw.arc false
hw.audioInput yes
hw.battery yes
hw.camera.back virtualscene
hw.camera.front emulated
hw.cpu.ncore 4
hw.device.hash2 MD5:c1e16fb26f89e9e2eecdc181aebcd1d6
hw.device.manufacturer Generic
hw.device.name 13.5in Freeform
hw.dPad no
hw.gps yes
hw.gpu.enabled yes
hw.gpu.mode auto
hw.initialOrientation landscape
hw.keyboard yes
hw.lcd.density 240
hw.lcd.height 1440
hw.lcd.width 2560
hw.mainKeys no
hw.ramSize 1536
hw.sdCard yes
hw.sensors.orientation yes
hw.sensors.proximity yes
hw.trackBall no
image.androidVersion.api 34
image.sysdir.1 system-images\android-34\google_apis\x86_64
PlayStore.enabled false
runtime.network.latency none
runtime.network.speed full
showDeviceFrame no
skin.dynamic yes
skin.path.backup _no_skin
tag.display Google APIs
tag.id google_apis
vm.heapSize 96

There is a simple example. I can't scroll the pdf, but I can scroll the containers.
return Scaffold(
appBar: Header(),
body: SingleChildScrollView(
child: Column(
children: [
SizedBox(
height: 600,
child: PDFView(
filePath: '/data/user/0/com.example.electricnet/app_flutter/example.pdf',
),
),
SizedBox(height: 50),
SizedBox(
height: 400,
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(height: 200, color: Colors.yellow),
Container(height: 200, color: Colors.red),
Container(height: 200, color: Colors.blue),
],
),
),
),
],
),
),
);

@Siddharth2212
Copy link

Siddharth2212 commented Apr 4, 2024

Add gestureRecognizers option in PDFView like this:
PDFView( gestureRecognizers: <Factory<OneSequenceGestureRecognizer>>[ new Factory<OneSequenceGestureRecognizer>( () => new EagerGestureRecognizer(), ), ].toSet(), autoSpacing: false, fitPolicy: FitPolicy.WIDTH, filePath: remotePDFpath, enableSwipe: true, swipeHorizontal: true, defaultPage: 0, pageFling: true, fitEachPage: true, onPageChanged: ((page, total) { // currentIndexNotifier.value = i; }), onViewCreated: (PDFViewController pdfViewController) { pdfController.complete(pdfViewController); }, )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants