From 43ae962390ac51cd79b418f592073b14a871ece1 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Tue, 4 Jan 2022 22:11:25 +0545 Subject: [PATCH] Bug fixes and updates (#95) * update dependencies * apply strict linter - conflict * Workaround for NPE, ignore IDE project files. * Bump version, upgrade dependencies. * Ignored files cleanup. * More deleted files. * Delete flutter_plugin_pdf_viewer.iml * More Eclipse artifacts cleanup. * Update Gradle dependencies. * Upgrade old Flutter embedding. * Upgrade Flutter embedding. * Better error logging, maybe properly time cache deletion. * Make sure file is closed when done. * Make sure file is closed when done, better this time. * Use initFileURLWithPath to create a valid file path The NSURL init method initFileURLWithPath will ensure that the file:/// prefix is in place as well as making sure that any whitespace characters within the original path string are encoded correctly when creating the url. * Release implicitly retained CGPDFDocument and release retained CGPDFPage * Update pubspec.yaml * Update pubspec.yaml * Pn 53 (#94) * I removed the line from 42 to 63 for deleting unused saved cache files. It makes memory problem when you try to open the PDF after several times. * remove .idea folder Co-authored-by: Eko Prasetyo * more fixes and updates * updates * fixes for state problems * upgrade ersion number * update * bug fixes Co-authored-by: Ahmed Masoud <47630729+maxzod@users.noreply.github.com> Co-authored-by: Ahmed Masoud Co-authored-by: Enver ALTIN Co-authored-by: Robert Hillary Co-authored-by: Eko Prasetyo --- .gitignore | 5 + .idea/flutter_pdf_viewer.iml | 18 - .idea/libraries/Dart_SDK.xml | 27 - .idea/libraries/Flutter_Plugins.xml | 11 - .idea/misc.xml | 4 - .idea/modules.xml | 11 - .idea/vcs.xml | 6 - .idea/workspace.xml | 544 ------------------ .vscode/launch.json | 14 - CHANGELOG.md | 7 +- analysis_options.yaml | 1 + android/.classpath | 6 - android/.gitignore | 3 + android/.project | 23 - .../org.eclipse.buildship.core.prefs | 13 - android/build.gradle | 4 +- .../FlutterPluginPdfViewerPlugin.java | 192 ++++--- example/android/.project | 17 - .../org.eclipse.buildship.core.prefs | 13 - example/android/app/.classpath | 6 - example/android/app/.project | 23 - .../org.eclipse.buildship.core.prefs | 2 - example/android/app/build.gradle | 12 +- .../android/app/src/main/AndroidManifest.xml | 9 +- .../plugins/GeneratedPluginRegistrant.java | 34 ++ .../MainActivity.java | 13 - .../app/src/profile/AndroidManifest.xml | 2 +- example/android/build.gradle | 2 +- example/android/gradle.properties | 1 - .../gradle/wrapper/gradle-wrapper.properties | 6 +- example/ios/Flutter/AppFrameworkInfo.plist | 2 +- example/ios/Flutter/Flutter.podspec | 18 + example/ios/Podfile | 61 +- example/ios/Podfile.lock | 40 +- example/ios/Runner.xcodeproj/project.pbxproj | 71 +-- .../contents.xcworkspacedata | 2 +- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- .../xcshareddata/WorkspaceSettings.xcsettings | 8 - example/lib/main.dart | 153 ++--- example/pubspec.lock | 72 +-- flutter_plugin_pdf_viewer.iml | 20 - ios/Classes/FlutterPluginPdfViewerPlugin.m | 37 +- lib/advance_pdf_viewer.dart | 5 +- lib/src/document.dart | 58 +- lib/src/page.dart | 32 +- lib/src/page_picker.dart | 4 +- lib/src/viewer.dart | 163 +++--- lib/src/zoomable_widget.dart | 139 ++--- pubspec.lock | 69 +-- pubspec.yaml | 11 +- 50 files changed, 614 insertions(+), 1382 deletions(-) delete mode 100644 .idea/flutter_pdf_viewer.iml delete mode 100644 .idea/libraries/Dart_SDK.xml delete mode 100644 .idea/libraries/Flutter_Plugins.xml delete mode 100644 .idea/misc.xml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/vcs.xml delete mode 100644 .idea/workspace.xml delete mode 100644 .vscode/launch.json create mode 100644 analysis_options.yaml delete mode 100644 android/.classpath delete mode 100644 android/.project delete mode 100644 android/.settings/org.eclipse.buildship.core.prefs delete mode 100644 example/android/.project delete mode 100644 example/android/.settings/org.eclipse.buildship.core.prefs delete mode 100644 example/android/app/.classpath delete mode 100644 example/android/app/.project delete mode 100644 example/android/app/.settings/org.eclipse.buildship.core.prefs create mode 100644 example/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java delete mode 100644 example/android/app/src/main/java/pt/tribeiro/flutter_plugin_pdf_viewer_example/MainActivity.java create mode 100644 example/ios/Flutter/Flutter.podspec delete mode 100644 example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings delete mode 100644 flutter_plugin_pdf_viewer.iml diff --git a/.gitignore b/.gitignore index f226b14..e8d3882 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,8 @@ build/ example/ios/Flutter/flutter_export_environment.sh example/.flutter-plugins-dependencies android/.idea/ + +.idea/ +android/.settings/ + +.vscode/ diff --git a/.idea/flutter_pdf_viewer.iml b/.idea/flutter_pdf_viewer.iml deleted file mode 100644 index 55d90fc..0000000 --- a/.idea/flutter_pdf_viewer.iml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Dart_SDK.xml b/.idea/libraries/Dart_SDK.xml deleted file mode 100644 index 80c115f..0000000 --- a/.idea/libraries/Dart_SDK.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Flutter_Plugins.xml b/.idea/libraries/Flutter_Plugins.xml deleted file mode 100644 index 24324de..0000000 --- a/.idea/libraries/Flutter_Plugins.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 99ae653..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index fd5603f..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1dd..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml deleted file mode 100644 index 2ef968f..0000000 --- a/.idea/workspace.xml +++ /dev/null @@ -1,544 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Android - - - Class metricsJava - - - Class structureJava - - - Cloning issuesJava - - - Code style issuesJava - - - CorrectnessLintAndroid - - - Dart - - - Declaration redundancyJava - - - DeclarationGroovy - - - Dependency issuesJava - - - EncapsulationJava - - - Error handlingGroovy - - - Error handlingJava - - - FinalizationJava - - - Flutter - - - Google Cloud Endpoints - - - Groovy - - - HTML - - - ImportsJava - - - Inheritance issuesJava - - - InitializationJava - - - InternationalizationJava - - - InternationalizationLintAndroid - - - J2ME issuesJava - - - Java - - - Java 5Java language level migration aidsJava - - - Java interop issuesKotlin - - - Java language level migration aidsJava - - - JavadocJava - - - Kotlin - - - LintAndroid - - - MemoryJava - - - Method metricsJava - - - Naming conventionsJava - - - Naming conventionsKotlin - - - Packaging issuesJava - - - PerformanceJava - - - PerformanceLintAndroid - - - Potentially confusing code constructsGroovy - - - Probable bugsJava - - - Probable bugsKotlin - - - Properties Files - - - Redundant constructsKotlin - - - RegExp - - - SecurityJava - - - SecurityLintAndroid - - - Threading issuesGroovy - - - Threading issuesJava - - - VisibilityJava - - - XML - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -