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(); }