From 6dee813215c86b10cec028aab7cb29d282908e41 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 12 Mar 2026 04:03:06 +0000 Subject: [PATCH 1/2] Initial plan From d6be5081ab08a378e3568f39d39d40fb219ec0c9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 12 Mar 2026 04:04:09 +0000 Subject: [PATCH 2/2] docs: update copilot-instructions.md with iOS/Android non-support reason Co-authored-by: zonble <53011+zonble@users.noreply.github.com> --- .github/copilot-instructions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index fa5d38a..cc77af3 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -101,7 +101,7 @@ All desktop methods guard against web usage with `if (kIsWeb) throw Exception(.. - **Swift (macOS):** Standard Swift style; `//MARK: -` comment separators for protocol sections. - **C++ (Windows/Linux):** Google-style C++; `snake_case` for variables and methods; braces on same line; use `std::optional` for the Windows proc delegate return type. - **Naming:** Plugin class is `FlutterWindowClosePlugin` on all platforms; channel names are string literals, not constants, and must match exactly across Dart and native. -- **No mobile support:** Do not add iOS or Android platform entries. The plugin intentionally targets desktop and web only. +- **No mobile support:** Do not add iOS or Android platform entries. iOS and Android do not have a window close event, so this plugin cannot be supported on those platforms. The plugin intentionally targets desktop (macOS, Windows, Linux) and web only. --- @@ -150,7 +150,7 @@ When adding new native files, update the relevant `CMakeLists.txt` (Windows/Linu ## Adding a New Platform -1. Add a native implementation in a new top-level directory (e.g., `ios/`). +1. Add a native implementation in a new top-level directory (e.g., `my_platform/`). 2. Register the plugin class in `pubspec.yaml` under `flutter.plugin.platforms`. 3. Implement the two method channels (`flutter_window_close` for commands, `flutter_window_close_notification` for events). 4. Guard any Dart-side platform-specific helpers with `defaultTargetPlatform` or `kIsWeb`.