Visitar URL original
[pigeon] Fixed void void async methods by gaaclarke · Pull Request #316 · flutter/packages · GitHub
Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
format
  • Loading branch information
gaaclarke committed Mar 23, 2021
commit 603f1759224589f2394f2ff97a58c8c607cecfaf
4 changes: 2 additions & 2 deletions packages/pigeon/lib/java_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void _writeHostApi(Indent indent, Api api) {
}
if (method.isAsynchronous) {
final String returnType =
method.returnType == 'void' ? 'Void' : method.returnType;
method.returnType == 'void' ? 'Void' : method.returnType;
argSignature.add('Result<$returnType> result');
}
indent.writeln('$returnType ${method.name}(${argSignature.join(', ')});');
Expand Down Expand Up @@ -97,7 +97,7 @@ void _writeHostApi(Indent indent, Api api) {
}
if (method.isAsynchronous) {
final String resultValue =
method.returnType == 'void' ? 'null' : 'result.toMap()';
method.returnType == 'void' ? 'null' : 'result.toMap()';
methodArgument.add(
'result -> { '
'wrapped.put("${Keys.result}", $resultValue); '
Expand Down