From a6d8cff81f2a7bf3684c9bf622b6a092e6bb2c2f Mon Sep 17 00:00:00 2001 From: Taylan YILDIZ Date: Wed, 12 Mar 2025 12:47:51 +0300 Subject: [PATCH] fix(android) Unused Plugin registration using Android embedding v1 --- .dart_tool/extension_discovery/README.md | 31 +++++++++++++++++++ .dart_tool/extension_discovery/vs_code.json | 1 + .dart_tool/version | 2 +- .../pdftronflutter/PdftronFlutterPlugin.java | 18 +++++------ 4 files changed, 42 insertions(+), 10 deletions(-) create mode 100644 .dart_tool/extension_discovery/README.md create mode 100644 .dart_tool/extension_discovery/vs_code.json diff --git a/.dart_tool/extension_discovery/README.md b/.dart_tool/extension_discovery/README.md new file mode 100644 index 00000000..9dc6757b --- /dev/null +++ b/.dart_tool/extension_discovery/README.md @@ -0,0 +1,31 @@ +Extension Discovery Cache +========================= + +This folder is used by `package:extension_discovery` to cache lists of +packages that contains extensions for other packages. + +DO NOT USE THIS FOLDER +---------------------- + + * Do not read (or rely) the contents of this folder. + * Do write to this folder. + +If you're interested in the lists of extensions stored in this folder use the +API offered by package `extension_discovery` to get this information. + +If this package doesn't work for your use-case, then don't try to read the +contents of this folder. It may change, and will not remain stable. + +Use package `extension_discovery` +--------------------------------- + +If you want to access information from this folder. + +Feel free to delete this folder +------------------------------- + +Files in this folder act as a cache, and the cache is discarded if the files +are older than the modification time of `.dart_tool/package_config.json`. + +Hence, it should never be necessary to clear this cache manually, if you find a +need to do please file a bug. diff --git a/.dart_tool/extension_discovery/vs_code.json b/.dart_tool/extension_discovery/vs_code.json new file mode 100644 index 00000000..81e4679a --- /dev/null +++ b/.dart_tool/extension_discovery/vs_code.json @@ -0,0 +1 @@ +{"version":2,"entries":[{"package":"pdftron_flutter","rootUri":"../","packageUri":"lib/"}]} \ No newline at end of file diff --git a/.dart_tool/version b/.dart_tool/version index 5436ea06..ffa7ee83 100644 --- a/.dart_tool/version +++ b/.dart_tool/version @@ -1 +1 @@ -3.3.2 \ No newline at end of file +3.29.1 \ No newline at end of file diff --git a/android/src/main/java/com/pdftron/pdftronflutter/PdftronFlutterPlugin.java b/android/src/main/java/com/pdftron/pdftronflutter/PdftronFlutterPlugin.java index aeffc32a..977df8f9 100644 --- a/android/src/main/java/com/pdftron/pdftronflutter/PdftronFlutterPlugin.java +++ b/android/src/main/java/com/pdftron/pdftronflutter/PdftronFlutterPlugin.java @@ -10,7 +10,7 @@ import io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding; import io.flutter.plugin.common.BinaryMessenger; import io.flutter.plugin.common.MethodChannel; -import io.flutter.plugin.common.PluginRegistry.Registrar; +// import io.flutter.plugin.common.PluginRegistry.Registrar; import io.flutter.plugin.platform.PlatformViewRegistry; /** @@ -60,12 +60,12 @@ public void onDetachedFromActivity() { } /** * Plugin registration using Android embedding v1. */ - public static void registerWith(Registrar registrar) { - final MethodChannel methodChannel = new MethodChannel(registrar.messenger(), "pdftron_flutter"); - methodChannel.setMethodCallHandler(new PluginMethodCallHandler(registrar.messenger(), registrar.activeContext())); - registrar - .platformViewRegistry() - .registerViewFactory(viewTypeId, - new DocumentViewFactory(registrar.messenger(), registrar.activeContext())); - } + // public static void registerWith(Registrar registrar) { + // final MethodChannel methodChannel = new MethodChannel(registrar.messenger(), "pdftron_flutter"); + // methodChannel.setMethodCallHandler(new PluginMethodCallHandler(registrar.messenger(), registrar.activeContext())); + // registrar + // .platformViewRegistry() + // .registerViewFactory(viewTypeId, + // new DocumentViewFactory(registrar.messenger(), registrar.activeContext())); + // } }