From dd0c881275d720e2ddffd7bfd5941b5aca95c5f7 Mon Sep 17 00:00:00 2001 From: stuartmorgan Date: Tue, 25 Aug 2020 08:30:05 -0700 Subject: [PATCH] [windows] Update plugin template (#64521) The pointer-argument-based version of Success() is deprecated; this updates the template to use the new reference-based version (which allows for inline construction of the response value). Part of https://github.com/flutter/flutter/issues/63975 --- .../templates/plugin/windows.tmpl/projectName_plugin.cpp.tmpl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/flutter_tools/templates/plugin/windows.tmpl/projectName_plugin.cpp.tmpl b/packages/flutter_tools/templates/plugin/windows.tmpl/projectName_plugin.cpp.tmpl index a2af158c86..0d12805be3 100644 --- a/packages/flutter_tools/templates/plugin/windows.tmpl/projectName_plugin.cpp.tmpl +++ b/packages/flutter_tools/templates/plugin/windows.tmpl/projectName_plugin.cpp.tmpl @@ -72,8 +72,7 @@ void {{pluginClass}}::HandleMethodCall( } else if (IsWindows7OrGreater()) { version_stream << "7"; } - flutter::EncodableValue response(version_stream.str()); - result->Success(&response); + result->Success(flutter::EncodableValue(version_stream.str())); } else { result->NotImplemented(); }