-
Notifications
You must be signed in to change notification settings - Fork 934
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix:Replace deprecated setAppCacheEnabled with setCacheMode
- Loading branch information
Showing
2 changed files
with
30 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 15 additions & 25 deletions
40
example/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,25 @@ | ||
package io.flutter.plugins; | ||
|
||
// import io.flutter.plugin.common.PluginRegistry; | ||
import androidx.annotation.NonNull; | ||
import io.flutter.embedding.engine.FlutterEngine; | ||
import io.flutter.embedding.engine.plugins.shim.ShimPluginRegistry; | ||
import io.flutter.plugin.common.PluginRegistry; | ||
import com.flutter_webview_plugin.FlutterWebviewPlugin; | ||
|
||
/** | ||
* Generated file. Do not edit. | ||
*/ | ||
// public final class GeneratedPluginRegistrant { | ||
// public static void registerWith(PluginRegistry registry) { | ||
// if (alreadyRegisteredWith(registry)) { | ||
// return; | ||
// } | ||
// FlutterWebviewPlugin.registerWith(registry.registrarFor("com.flutter_webview_plugin.FlutterWebviewPlugin")); | ||
// } | ||
|
||
// private static boolean alreadyRegisteredWith(PluginRegistry registry) { | ||
// final String key = GeneratedPluginRegistrant.class.getCanonicalName(); | ||
// if (registry.hasPlugin(key)) { | ||
// return true; | ||
// } | ||
// registry.registrarFor(key); | ||
// return false; | ||
// } | ||
// } | ||
|
||
public final class GeneratedPluginRegistrant { | ||
public static void registerWith(@NonNull FlutterEngine flutterEngine) { | ||
ShimPluginRegistry shimPluginRegistry = new ShimPluginRegistry(flutterEngine); | ||
FlutterWebviewPlugin.registerWith(shimPluginRegistry.registrarFor("com.flutter_webview_plugin.FlutterWebviewPlugin")); | ||
public static void registerWith(PluginRegistry registry) { | ||
if (alreadyRegisteredWith(registry)) { | ||
return; | ||
} | ||
FlutterWebviewPlugin.registerWith(registry.registrarFor("com.flutter_webview_plugin.FlutterWebviewPlugin")); | ||
} | ||
|
||
private static boolean alreadyRegisteredWith(PluginRegistry registry) { | ||
final String key = GeneratedPluginRegistrant.class.getCanonicalName(); | ||
if (registry.hasPlugin(key)) { | ||
return true; | ||
} | ||
registry.registrarFor(key); | ||
return false; | ||
} | ||
} |