We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8db2bc9 commit deb8dbcCopy full SHA for deb8dbc
packages/tray_manager/windows/tray_manager_plugin.cpp
@@ -89,9 +89,18 @@ class TrayManagerPlugin : public flutter::Plugin {
89
std::unique_ptr<flutter::MethodResult<flutter::EncodableValue>> result);
90
};
91
92
+static bool plugin_already_registered = false;
93
+
94
// static
95
void TrayManagerPlugin::RegisterWithRegistrar(
96
flutter::PluginRegistrarWindows* registrar) {
97
+ if (plugin_already_registered) {
98
+ // Skip registration in subwindow
99
+ return;
100
+ }
101
102
+ plugin_already_registered = true;
103
104
channel = std::make_unique<flutter::MethodChannel<flutter::EncodableValue>>(
105
registrar->messenger(), "tray_manager",
106
&flutter::StandardMethodCodec::GetInstance());
0 commit comments