Skip to content

Commit a6816d8

Browse files
feat: add url_launcher plugin registration for Linux, Windows, and macOS
1 parent 481f9a9 commit a6816d8

File tree

5 files changed

+13
-0
lines changed

5 files changed

+13
-0
lines changed

linux/flutter/generated_plugin_registrant.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,13 @@
77
#include "generated_plugin_registrant.h"
88

99
#include <flutter_secure_storage_linux/flutter_secure_storage_linux_plugin.h>
10+
#include <url_launcher_linux/url_launcher_plugin.h>
1011

1112
void fl_register_plugins(FlPluginRegistry* registry) {
1213
g_autoptr(FlPluginRegistrar) flutter_secure_storage_linux_registrar =
1314
fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterSecureStorageLinuxPlugin");
1415
flutter_secure_storage_linux_plugin_register_with_registrar(flutter_secure_storage_linux_registrar);
16+
g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
17+
fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
18+
url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
1519
}

linux/flutter/generated_plugins.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
list(APPEND FLUTTER_PLUGIN_LIST
66
flutter_secure_storage_linux
7+
url_launcher_linux
78
)
89

910
list(APPEND FLUTTER_FFI_PLUGIN_LIST

macos/Flutter/GeneratedPluginRegistrant.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,16 @@ import Foundation
77

88
import flutter_secure_storage_macos
99
import local_auth_darwin
10+
import package_info_plus
1011
import path_provider_foundation
1112
import shared_preferences_foundation
13+
import url_launcher_macos
1214

1315
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
1416
FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin"))
1517
FLALocalAuthPlugin.register(with: registry.registrar(forPlugin: "FLALocalAuthPlugin"))
18+
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
1619
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
1720
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
21+
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
1822
}

windows/flutter/generated_plugin_registrant.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <flutter_secure_storage_windows/flutter_secure_storage_windows_plugin.h>
1010
#include <local_auth_windows/local_auth_plugin.h>
1111
#include <permission_handler_windows/permission_handler_windows_plugin.h>
12+
#include <url_launcher_windows/url_launcher_windows.h>
1213

1314
void RegisterPlugins(flutter::PluginRegistry* registry) {
1415
FlutterSecureStorageWindowsPluginRegisterWithRegistrar(
@@ -17,4 +18,6 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
1718
registry->GetRegistrarForPlugin("LocalAuthPlugin"));
1819
PermissionHandlerWindowsPluginRegisterWithRegistrar(
1920
registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin"));
21+
UrlLauncherWindowsRegisterWithRegistrar(
22+
registry->GetRegistrarForPlugin("UrlLauncherWindows"));
2023
}

windows/flutter/generated_plugins.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ list(APPEND FLUTTER_PLUGIN_LIST
66
flutter_secure_storage_windows
77
local_auth_windows
88
permission_handler_windows
9+
url_launcher_windows
910
)
1011

1112
list(APPEND FLUTTER_FFI_PLUGIN_LIST

0 commit comments

Comments
 (0)