From 258d85a98c879d1b9bc87c77339c9d6d2a973d8d Mon Sep 17 00:00:00 2001 From: Gustl22 Date: Sun, 26 Apr 2026 22:22:01 +0200 Subject: [PATCH 1/3] [pigeon] fix: Apply correct ThrowError success callback --- .../pigeon/platform_tests/test_plugin/windows/test_plugin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/pigeon/platform_tests/test_plugin/windows/test_plugin.cpp b/packages/pigeon/platform_tests/test_plugin/windows/test_plugin.cpp index 3e6056f3a810..723ee27b41a0 100644 --- a/packages/pigeon/platform_tests/test_plugin/windows/test_plugin.cpp +++ b/packages/pigeon/platform_tests/test_plugin/windows/test_plugin.cpp @@ -746,8 +746,8 @@ void TestPlugin::CallFlutterThrowError( std::function> reply)> result) { flutter_api_->ThrowError( - [result](const std::optional& echo) { - result(echo); + [result](const flutter::EncodableValue* echo) { + result(echo ? std::make_optional(*echo) : std::nullopt); }, [result](const FlutterError& error) { result(error); }); } From 2ec8a8323bc62ee3db7ca8aa87d82367a2ff68c0 Mon Sep 17 00:00:00 2001 From: August Date: Tue, 28 Apr 2026 22:40:51 +0200 Subject: [PATCH 2/3] Update packages/pigeon/platform_tests/test_plugin/windows/test_plugin.cpp Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- .../pigeon/platform_tests/test_plugin/windows/test_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pigeon/platform_tests/test_plugin/windows/test_plugin.cpp b/packages/pigeon/platform_tests/test_plugin/windows/test_plugin.cpp index 723ee27b41a0..153ce327adb1 100644 --- a/packages/pigeon/platform_tests/test_plugin/windows/test_plugin.cpp +++ b/packages/pigeon/platform_tests/test_plugin/windows/test_plugin.cpp @@ -747,7 +747,7 @@ void TestPlugin::CallFlutterThrowError( result) { flutter_api_->ThrowError( [result](const flutter::EncodableValue* echo) { - result(echo ? std::make_optional(*echo) : std::nullopt); + result(echo ? std::optional(*echo) : std::nullopt); }, [result](const FlutterError& error) { result(error); }); } From 848555a625c58dac311517b5d4e333b3d77e484c Mon Sep 17 00:00:00 2001 From: stuartmorgan-g Date: Wed, 29 Apr 2026 10:24:53 -0400 Subject: [PATCH 3/3] Format --- .../pigeon/platform_tests/test_plugin/windows/test_plugin.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/pigeon/platform_tests/test_plugin/windows/test_plugin.cpp b/packages/pigeon/platform_tests/test_plugin/windows/test_plugin.cpp index 153ce327adb1..212e1866fa83 100644 --- a/packages/pigeon/platform_tests/test_plugin/windows/test_plugin.cpp +++ b/packages/pigeon/platform_tests/test_plugin/windows/test_plugin.cpp @@ -747,7 +747,8 @@ void TestPlugin::CallFlutterThrowError( result) { flutter_api_->ThrowError( [result](const flutter::EncodableValue* echo) { - result(echo ? std::optional(*echo) : std::nullopt); + result(echo ? std::optional(*echo) + : std::nullopt); }, [result](const FlutterError& error) { result(error); }); }