Visitar URL original
Pigeon : Support for asynchronous methods/Functions by xsahil03x · Pull Request #201 · 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
Next Next commit
Minor improvements
Signed-off-by: Sahil Kumar <xdsahil@gmail.com>
  • Loading branch information
xsahil03x committed Sep 24, 2020
commit 76c4433158794ae378aa9199cea30b35a93a8609
4 changes: 2 additions & 2 deletions packages/pigeon/lib/dart_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,12 @@ void _writeFlutterApi(Indent indent, Api api,
final String argType = func.argType;
final String returnType = func.returnType;
final bool isAsync = func.isAsynchronous;
indent.writeln(
'final Map<dynamic, dynamic> mapMessage = message as Map<dynamic, dynamic>;');
String call;
if (argType == 'void') {
call = 'api.${func.name}()';
} else {
indent.writeln(
'final Map<dynamic, dynamic> mapMessage = message as Map<dynamic, dynamic>;');
indent.writeln(
'final $argType input = $argType._fromMap(mapMessage);');
call = 'api.${func.name}(input)';
Expand Down