mirror of
https://github.com/flutter/packages.git
synced 2025-07-04 01:33:59 +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
|
## 0.1.5
|
||||||
|
|
||||||
* Made array datatypes correctly get imported and exported avoiding the need to
|
* Made array datatypes correctly get imported and exported avoiding the need to
|
||||||
|
@ -92,12 +92,12 @@ void _writeFlutterApi(Indent indent, Api api,
|
|||||||
indent.scoped('{', '});', () {
|
indent.scoped('{', '});', () {
|
||||||
final String argType = func.argType;
|
final String argType = func.argType;
|
||||||
final String returnType = func.returnType;
|
final String returnType = func.returnType;
|
||||||
indent.writeln(
|
|
||||||
'final Map<dynamic, dynamic> mapMessage = message as Map<dynamic, dynamic>;');
|
|
||||||
String call;
|
String call;
|
||||||
if (argType == 'void') {
|
if (argType == 'void') {
|
||||||
call = 'api.${func.name}()';
|
call = 'api.${func.name}()';
|
||||||
} else {
|
} else {
|
||||||
|
indent.writeln(
|
||||||
|
'final Map<dynamic, dynamic> mapMessage = message as Map<dynamic, dynamic>;');
|
||||||
indent.writeln(
|
indent.writeln(
|
||||||
'final $argType input = $argType._fromMap(mapMessage);');
|
'final $argType input = $argType._fromMap(mapMessage);');
|
||||||
call = 'api.${func.name}(input)';
|
call = 'api.${func.name}(input)';
|
||||||
|
@ -8,7 +8,7 @@ import 'dart:mirrors';
|
|||||||
import 'ast.dart';
|
import 'ast.dart';
|
||||||
|
|
||||||
/// The current version of pigeon.
|
/// 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.
|
/// Read all the content from [stdin] to a String.
|
||||||
String readStdin() {
|
String readStdin() {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
name: pigeon
|
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.
|
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
|
homepage: https://github.com/flutter/packages/tree/master/packages/pigeon
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -42,7 +42,7 @@ test_pigeon_ios() {
|
|||||||
-o $temp_dir/pigeon.o
|
-o $temp_dir/pigeon.o
|
||||||
|
|
||||||
dartfmt -w $temp_dir/pigeon.dart
|
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
|
rm -rf $temp_dir
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user