Visitar URL original
[pigeon] updated example page (#221) · flutter/packages@6ea4cd0 · GitHub
Skip to content

Commit 6ea4cd0

Browse files
authored
[pigeon] updated example page (#221)
* pigeon - updated the examples tab * fixed version number
1 parent 2d1e396 commit 6ea4cd0

4 files changed

Lines changed: 42 additions & 8 deletions

File tree

‎packages/pigeon/CHANGELOG.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.1.10+1
2+
3+
* Updated the examples page.
4+
15
## 0.1.10
26

37
* Fixed bug that prevented running `pigeon` on Windows (introduced in `0.1.8`).

‎packages/pigeon/example/README.md‎

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
1-
# Pigeon iOS / Android Example
1+
# Pigeon Examples
22

3-
## message.dart
3+
## HostApi Example
4+
5+
This example gives an overview of how to use Pigeon to call into the
6+
host-platform from Flutter.
7+
8+
### message.dart
9+
10+
This is the Pigeon file that describes the interface that will be used to call
11+
from Flutter to the host-platform.
412

513
```dart
614
import 'package:pigeon/pigeon.dart';
@@ -19,7 +27,10 @@ abstract class Api {
1927
}
2028
```
2129

22-
## invocation
30+
### invocation
31+
32+
This is the call to Pigeon that will injest `message.dart` and generate the code
33+
for iOS and Android.
2334

2435
```sh
2536
flutter pub run pigeon \
@@ -31,7 +42,10 @@ flutter pub run pigeon \
3142
--java_package "dev.flutter.pigeon"
3243
```
3344

34-
## AppDelegate.m
45+
### AppDelegate.m
46+
47+
This is the code that will use the generated Objective-C code to recieve calls
48+
from Flutter.
3549

3650
```objc
3751
#import "AppDelegate.h"
@@ -58,7 +72,9 @@ didFinishLaunchingWithOptions:(NSDictionary<UIApplicationLaunchOptionsKey, id> *
5872
}
5973
```
6074
61-
## StartActivity.java
75+
### StartActivity.java
76+
77+
This is the code that will use the generated Java code to receive calls from Flutter.
6278
6379
```java
6480
import dev.flutter.pigeon.Pigeon;
@@ -79,7 +95,10 @@ public class StartActivity extends Activity {
7995
}
8096
```
8197

82-
## test.dart
98+
### test.dart
99+
100+
This is the Dart code that will call into the host-platform using the generated
101+
Dart code.
83102

84103
```dart
85104
import 'pigeon.dart';
@@ -94,3 +113,14 @@ void main() {
94113
}
95114
96115
```
116+
117+
## Swift / Kotlin Plugin Example
118+
119+
A downloadable example of using Pigeon to create a Flutter Plugin with Swift and
120+
Kotlin can be found at
121+
[gaaclarke/flutter_plugin_example](https://github.com/gaaclarke/pigeon_plugin_example).
122+
123+
## Swift Add-to-app Example
124+
125+
A full example of using Pigeon for add-to-app with Swift on iOS can be found at
126+
[gaaclarke/GiantsA2A](https://github.com/gaaclarke/GiantsA2A).

‎packages/pigeon/lib/generator_tools.dart‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import 'dart:mirrors';
88
import 'ast.dart';
99

1010
/// The current version of pigeon.
11-
const String pigeonVersion = '0.1.10';
11+
const String pigeonVersion = '0.1.10+1';
1212

1313
/// Read all the content from [stdin] to a String.
1414
String readStdin() {

‎packages/pigeon/pubspec.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: pigeon
2-
version: 0.1.10
2+
version: 0.1.10+1
33
description: Code generator tool to make communication between Flutter and the host platform type-safe and easier.
44
homepage: https://github.com/flutter/packages/tree/master/packages/pigeon
55
dependencies:

0 commit comments

Comments
 (0)