-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[pigeon] 0.2.0 Made null-safe generation the default, updated documentation #315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
4fbdf1d
1381db4
caf4abb
8684814
7341b58
735ac1a
0850c0b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,8 +8,9 @@ host platform type-safe and easier. | |
| ## Supported Platforms | ||
|
|
||
| Currently Pigeon only supports generating Objective-C code for usage on iOS and | ||
| Java code for Android. The Objective-C code is [accessible to Swift](https://developer.apple.com/documentation/swift/imported_c_and_objective-c_apis/importing_objective-c_into_swift) and the Java | ||
| code is accessible to Kotlin. | ||
| Java code for Android. The Objective-C code is | ||
| [accessible to Swift](https://developer.apple.com/documentation/swift/imported_c_and_objective-c_apis/importing_objective-c_into_swift) | ||
| and the Java code is accessible to Kotlin. | ||
|
|
||
| ## Runtime Requirements | ||
|
|
||
|
|
@@ -64,7 +65,8 @@ See the "Example" tab. A full working example can also be found in the | |
|
|
||
| Pigeon uses the `StandardMessageCodec` so it supports any data-type platform | ||
| channels supports | ||
| [[documentation](https://flutter.dev/docs/development/platform-integration/platform-channels#codec)]. Nested data-types are supported, too. | ||
| [[documentation](https://flutter.dev/docs/development/platform-integration/platform-channels#codec)]. | ||
| Nested data-types are supported, too. | ||
|
|
||
| Note: Generics for List and Map aren't supported yet. | ||
|
|
||
|
|
@@ -112,9 +114,12 @@ public interface Api2Host { | |
|
|
||
| ## Null Safety (NNBD) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should caveat this a bit more clearly. If we're highlighting null safety more prominently, we should be clear there are 2 layers. There's the general null safety concept and there we're not doing too much yet. Things can't be defined as non-null and the nullable types aren't specifically annotated as so in kotlin and swift. There's also the Dart 2.12 null safety mechanism. We don't support non-null neither but we properly tag everything as nullable now.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
|
|
||
| In order to generate null-safe code run the command line with the extra argument | ||
| `--dart_null_safety`. For example: | ||
| `flutter pub run pigeon --input ./pigeons/messages.dart --dart_null_safety`. | ||
| Right now Pigeon supports generating null-safe code, but it doesn't yet support | ||
| [non-null fields](https://github.com/flutter/flutter/issues/59118). | ||
|
|
||
| The default is to generate null-safe code but in order to generate non-null-safe | ||
| code run Pigeon with the extra argument `--no-dart_null_safety`. For example: | ||
| `flutter pub run pigeon --input ./pigeons/messages.dart --no-dart_null_safety --dart_out stdout`. | ||
|
|
||
| ## Feedback | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since it's a breaking change, add a banner at the top of this page too to describe where the break is