Closed sumitzartek closed 3 years ago
hi @sumitzartek this google drive link will not work because this not a download link now I making a helper method that's will help u to get a download link
use this method to get a download link from the google drive link
String getDownloadLinkFromDrive(String driveLink) {
final fileId = RegExp(r'/d\/(.+?)(?:\/|#|\?|$)$')
.stringMatch(driveLink)
.split('/')[2];
if (fileId == null) return driveLink;
return 'https://drive.google.com/uc?export=download&id=$fileId';
}
use it like this
PDF(
swipeHorizontal: true,
).cachedFromUrl(getDownloadLinkFromDrive('https://drive.google.com/file/d/1GkgKDPjtnv-WXd8k0Jc1y6su20RFnZy6/view?usp=sharing)),
@sumitzartek let me know if this fixed ur issue
I have the same issue. your solution save my time thanks friend. I waste lot of my time for it. Your solution is the best.thanks again
your solution saves me allot of time. I also waste a lot of my time on it. Your answer is the best.
Thank you
Describe the bug I have create your sample project clone and then after I tried to view the PDF This One : https://drive.google.com/file/d/1GkgKDPjtnv-WXd8k0Jc1y6su20RFnZy6/view?usp=sharing I was unable to View.
Is there any way to do this : So please tell me
PDF( swipeHorizontal: true, ).cachedFromUrl( 'https://drive.google.com/file/d/1GkgKDPjtnv-WXd8k0Jc1y6su20RFnZy6/view?usp=sharing'), )
Desktop (please complete the following information):