Skip to content

Commit 5b28228

Browse files
committed
update document
1 parent aee0e9f commit 5b28228

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

README.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ void registerPlugins(NSObject<FlutterPluginRegistry>* registry) {
6464
// along with other plugins that need UI manipulation, you should register
6565
// `FlutterDownloaderPlugin` and any 'background' plugins explicitly like this:
6666
//
67-
// [FlutterDownloaderPlugin registerWithRegistrar:[registry registrarForPlugin:@"vn.hunghd.flutter_downloader"]];
67+
// if (![registry hasPlugin:@"FlutterDownloaderPlugin"]) {
68+
// [FlutterDownloaderPlugin registerWithRegistrar:[registry registrarForPlugin:@"FlutterDownloaderPlugin"]];
69+
// }
6870
//
6971
[GeneratedPluginRegistrant registerWithRegistry:registry];
7072
}
@@ -113,7 +115,9 @@ private func registerPlugins(registry: FlutterPluginRegistry) {
113115
// plugins that need UI manipulation, you should register `FlutterDownloaderPlugin` and any
114116
// 'background' plugins explicitly like this:
115117
//
116-
// FlutterDownloaderPlugin.register(with: registry.registrar(forPlugin: "vn.hunghd.flutter_downloader"))
118+
// if (!registry.hasPlugin("FlutterDownloaderPlugin")) {
119+
// FlutterDownloaderPlugin.register(with: registry.registrar(forPlugin: "FlutterDownloaderPlugin"))
120+
// }
117121
//
118122
GeneratedPluginRegistrant.register(with: registry)
119123
}

android_integration_note.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ public class MyApplication extends FlutterApplication implements PluginRegistry.
2929
// along with other plugins that need UI manipulation, you should register
3030
// `FlutterDownloaderPlugin` and any 'background' plugins explicitly like this:
3131
//
32-
// FlutterDownloaderPlugin.registerWith(registry.registrarFor("vn.hunghd.flutterdownloader.FlutterDownloaderPlugin"));
32+
// if (!registry.hasPlugin("vn.hunghd.flutterdownloader.FlutterDownloaderPlugin")) {
33+
// FlutterDownloaderPlugin.registerWith(registry.registrarFor("vn.hunghd.flutterdownloader.FlutterDownloaderPlugin"));
34+
// }
3335
//
3436
GeneratedPluginRegistrant.registerWith(registry);
3537
}
@@ -60,7 +62,9 @@ internal class MyApplication : FlutterApplication(), PluginRegistry.PluginRegist
6062
// along with other plugins that need UI manipulation, you should register
6163
// `FlutterDownloaderPlugin` and any 'background' plugins explicitly like this:
6264
//
63-
// FlutterDownloaderPlugin.registerWith(registry.registrarFor("vn.hunghd.flutterdownloader.FlutterDownloaderPlugin"))
65+
// if (!registry.hasPlugin("vn.hunghd.flutterdownloader.FlutterDownloaderPlugin")) {
66+
// FlutterDownloaderPlugin.registerWith(registry.registrarFor("vn.hunghd.flutterdownloader.FlutterDownloaderPlugin"))
67+
// }
6468
//
6569
GeneratedPluginRegistrant.registerWith(registry)
6670
}

0 commit comments

Comments
 (0)