[Pigeon] fixed dart linter problem (#207)

This commit is contained in:
gaaclarke
2020-09-16 14:50:32 -07:00
committed by GitHub
parent 93b81b5091
commit 18af7ba14e
5 changed files with 9 additions and 5 deletions

View File

@ -1,3 +1,7 @@
## 0.1.6
* Fixed unused variable linter warning in Dart code under certain conditions.
## 0.1.5
* Made array datatypes correctly get imported and exported avoiding the need to

View File

@ -92,12 +92,12 @@ void _writeFlutterApi(Indent indent, Api api,
indent.scoped('{', '});', () {
final String argType = func.argType;
final String returnType = func.returnType;
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)';

View File

@ -8,7 +8,7 @@ import 'dart:mirrors';
import 'ast.dart';
/// The current version of pigeon.
const String pigeonVersion = '0.1.5';
const String pigeonVersion = '0.1.6';
/// Read all the content from [stdin] to a String.
String readStdin() {

View File

@ -1,5 +1,5 @@
name: pigeon
version: 0.1.5
version: 0.1.6
description: Code generator tool to make communication between Flutter and the host platform type-safe and easier.
homepage: https://github.com/flutter/packages/tree/master/packages/pigeon
dependencies:

View File

@ -42,7 +42,7 @@ test_pigeon_ios() {
-o $temp_dir/pigeon.o
dartfmt -w $temp_dir/pigeon.dart
dartanalyzer $temp_dir/pigeon.dart --packages ./e2e_tests/test_objc/.packages
dartanalyzer $temp_dir/pigeon.dart --fatal-infos --fatal-warnings --packages ./e2e_tests/test_objc/.packages
rm -rf $temp_dir
}