[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
This commit is contained in:
stuartmorgan
2020-08-25 08:30:05 -07:00
committed by GitHub
parent 707f995de3
commit dd0c881275

View File

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