mirror of
https://github.com/flutter/packages.git
synced 2025-07-01 23:51:55 +08:00
[Pigeon] fixed dart linter problem (#207)
This commit is contained in:
@ -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
|
||||
|
@ -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)';
|
||||
|
@ -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() {
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user