diff --git a/shell/platform/android/io/flutter/plugin/common/BinaryCodec.java b/shell/platform/android/io/flutter/plugin/common/BinaryCodec.java
index 563f91c4347b1..6514dc21b1148 100644
--- a/shell/platform/android/io/flutter/plugin/common/BinaryCodec.java
+++ b/shell/platform/android/io/flutter/plugin/common/BinaryCodec.java
@@ -7,7 +7,14 @@
import java.nio.ByteBuffer;
/**
- * A {@link MessageCodec} using unencoded binary messages, represented as {@link ByteBuffer}s.
+ * A {@link MessageCodec} using unencoded binary messages, represented as
+ * {@link ByteBuffer}s.
+ *
+ *
This codec is guaranteed to be compatible with the corresponding
+ * BinaryCodec
+ * on the Dart side. These parts of the Flutter SDK are evolved synchronously.
+ *
+ * On the Dart side, messages are represented using {@code ByteData}.
*/
public final class BinaryCodec implements MessageCodec {
// This codec must match the Dart codec of the same name in package flutter/services.
diff --git a/shell/platform/android/io/flutter/plugin/common/JSONMessageCodec.java b/shell/platform/android/io/flutter/plugin/common/JSONMessageCodec.java
index ab284c9753b76..85d14fcc290ee 100644
--- a/shell/platform/android/io/flutter/plugin/common/JSONMessageCodec.java
+++ b/shell/platform/android/io/flutter/plugin/common/JSONMessageCodec.java
@@ -12,7 +12,15 @@
/**
* A {@link MessageCodec} using UTF-8 encoded JSON messages.
*
- * Supports the same Java values as {@link JSONObject#wrap(Object)}.
+ * This codec is guaranteed to be compatible with the corresponding
+ * JSONMessageCodec
+ * on the Dart side. These parts of the Flutter SDK are evolved synchronously.
+ *
+ * Supports the same Java values as {@link JSONObject#wrap(Object)}.
+ *
+ * On the Dart side, JSON messages are handled by the JSON facilities of the
+ * dart:convert
+ * package.
*/
public final class JSONMessageCodec implements MessageCodec {
// This codec must match the Dart codec of the same name in package flutter/services.
diff --git a/shell/platform/android/io/flutter/plugin/common/JSONMethodCodec.java b/shell/platform/android/io/flutter/plugin/common/JSONMethodCodec.java
index 263ab2cff39f8..bd4b52f5914c5 100644
--- a/shell/platform/android/io/flutter/plugin/common/JSONMethodCodec.java
+++ b/shell/platform/android/io/flutter/plugin/common/JSONMethodCodec.java
@@ -7,8 +7,13 @@
/**
* A {@link MethodCodec} using UTF-8 encoded JSON method calls and result envelopes.
- * Values supported as methods arguments and result payloads are those supported by
- * {@link JSONMessageCodec}.
+ *
+ * This codec is guaranteed to be compatible with the corresponding
+ * JSONMethodCodec
+ * on the Dart side. These parts of the Flutter SDK are evolved synchronously.
+ *
+ * Values supported as methods arguments and result payloads are those supported by
+ * {@link JSONMessageCodec}.
*/
public final class JSONMethodCodec implements MethodCodec {
// This codec must match the Dart codec of the same name in package flutter/services.
diff --git a/shell/platform/android/io/flutter/plugin/common/StandardMessageCodec.java b/shell/platform/android/io/flutter/plugin/common/StandardMessageCodec.java
index 21bd7fa711b7c..29c89685ddfe9 100644
--- a/shell/platform/android/io/flutter/plugin/common/StandardMessageCodec.java
+++ b/shell/platform/android/io/flutter/plugin/common/StandardMessageCodec.java
@@ -18,11 +18,11 @@
/**
* MessageCodec using the Flutter standard binary encoding.
*
- * The standard encoding is guaranteed to be compatible with the corresponding standard codec
- * for PlatformMessageChannels on the Flutter side. These parts of the Flutter SDK are evolved
- * synchronously.
+ * This codec is guaranteed to be compatible with the corresponding
+ * StandardMessageCodec
+ * on the Dart side. These parts of the Flutter SDK are evolved synchronously.
*
- * Supported messages are acyclic values of these forms:
+ * Supported messages are acyclic values of these forms:
*
*
* null
@@ -34,9 +34,24 @@
* Lists of supported values
* Maps with supported keys and values
*
+ *
+ * On the Dart side, these values are represented as follows:
+ *
+ *
+ * null: null
+ * Boolean: bool
+ * Byte, Short, Integer, Long, BigInteger: int
+ * Float, Double: double
+ * String: String
+ * byte[]: Uint8List
+ * int[]: Int32List
+ * long[]: Int64List
+ * double[]: Float64List
+ * List: List
+ * Map: Map
+ *
*/
public final class StandardMessageCodec implements MessageCodec {
- // This codec must match the Dart codec of the same name in package flutter/services.
public static final StandardMessageCodec INSTANCE = new StandardMessageCodec();
private StandardMessageCodec() {
diff --git a/shell/platform/android/io/flutter/plugin/common/StandardMethodCodec.java b/shell/platform/android/io/flutter/plugin/common/StandardMethodCodec.java
index a6a1029510ceb..173514a3b449b 100644
--- a/shell/platform/android/io/flutter/plugin/common/StandardMethodCodec.java
+++ b/shell/platform/android/io/flutter/plugin/common/StandardMethodCodec.java
@@ -11,15 +11,14 @@
/**
* A {@link MethodCodec} using the Flutter standard binary encoding.
*
- * The standard codec is guaranteed to be compatible with the corresponding standard codec for
- * PlatformMethodChannels on the Flutter side. These parts of the Flutter SDK are evolved
- * synchronously.
+ * This codec is guaranteed to be compatible with the corresponding
+ * StandardMethodCodec
+ * on the Dart side. These parts of the Flutter SDK are evolved synchronously.
*
- * Values supported as method arguments and result payloads are those supported by
- * {@link StandardMessageCodec}.
+ * Values supported as method arguments and result payloads are those supported by
+ * {@link StandardMessageCodec}.
*/
public final class StandardMethodCodec implements MethodCodec {
- // This codec must match the Dart codec of the same name in package flutter/services.
public static final StandardMethodCodec INSTANCE = new StandardMethodCodec();
private StandardMethodCodec() {
diff --git a/shell/platform/android/io/flutter/plugin/common/StringCodec.java b/shell/platform/android/io/flutter/plugin/common/StringCodec.java
index dac376ba0d434..9851cf4ccf60c 100644
--- a/shell/platform/android/io/flutter/plugin/common/StringCodec.java
+++ b/shell/platform/android/io/flutter/plugin/common/StringCodec.java
@@ -9,9 +9,12 @@
/**
* A {@link MessageCodec} using UTF-8 encoded String messages.
+ *
+ * This codec is guaranteed to be compatible with the corresponding
+ * StringCodec
+ * on the Dart side. These parts of the Flutter SDK are evolved synchronously.
*/
public final class StringCodec implements MessageCodec {
- // This codec must match the Dart codec of the same name in package flutter/services.
private static final Charset UTF8 = Charset.forName("UTF8");
public static final StringCodec INSTANCE = new StringCodec();
diff --git a/shell/platform/darwin/ios/framework/Headers/FlutterCodecs.h b/shell/platform/darwin/ios/framework/Headers/FlutterCodecs.h
index f1c4b2880a083..89b7e66d14713 100644
--- a/shell/platform/darwin/ios/framework/Headers/FlutterCodecs.h
+++ b/shell/platform/darwin/ios/framework/Headers/FlutterCodecs.h
@@ -40,6 +40,12 @@ FLUTTER_EXPORT
/**
A `FlutterMessageCodec` using unencoded binary messages, represented as
`NSData` instances.
+
+ This codec is guaranteed to be compatible with the corresponding
+ [BinaryCodec](https://docs.flutter.io/flutter/services/BinaryCodec-class.html)
+ on the Dart side. These parts of the Flutter SDK are evolved synchronously.
+
+ On the Dart side, messages are represented using `ByteData`.
*/
FLUTTER_EXPORT
@interface FlutterBinaryCodec : NSObject
@@ -47,6 +53,10 @@ FLUTTER_EXPORT
/**
A `FlutterMessageCodec` using UTF-8 encoded `NSString` messages.
+
+ This codec is guaranteed to be compatible with the corresponding
+ [StringCodec](https://docs.flutter.io/flutter/services/StringCodec-class.html)
+ on the Dart side. These parts of the Flutter SDK are evolved synchronously.
*/
FLUTTER_EXPORT
@interface FlutterStringCodec : NSObject
@@ -55,7 +65,16 @@ FLUTTER_EXPORT
/**
A `FlutterMessageCodec` using UTF-8 encoded JSON messages.
- Supports the same values as `NSJSONSerialization`.
+ This codec is guaranteed to be compatible with the corresponding
+ [JSONMessageCodec](https://docs.flutter.io/flutter/services/JSONMessageCodec-class.html)
+ on the Dart side. These parts of the Flutter SDK are evolved synchronously.
+
+ Supports values accepted by `NSJSONSerialization` plus top-level
+ `nil`, `NSNumber`, and `NSString`.
+
+ On the Dart side, JSON messages are handled by the JSON facilities of the
+ [`dart:convert`](https://api.dartlang.org/stable/dart-convert/JSON-constant.html)
+ package.
*/
FLUTTER_EXPORT
@interface FlutterJSONMessageCodec : NSObject
@@ -64,19 +83,29 @@ FLUTTER_EXPORT
/**
A `FlutterMessageCodec` using the Flutter standard binary encoding.
- The standard encoding is guaranteed to be compatible with the corresponding
- standard codec for PlatformMessageChannels on the Flutter side. These parts
- of the Flutter SDK are evolved synchronously.
+ This codec is guaranteed to be compatible with the corresponding
+ [StandardMessageCodec](https://docs.flutter.io/flutter/services/StandardMessageCodec-class.html)
+ on the Dart side. These parts of the Flutter SDK are evolved synchronously.
Supported messages are acyclic values of these forms:
- `nil` or `NSNull`
- `NSNumber` (including their representation of Boolean values)
- `FlutterStandardBigInteger`
- - `FlutterStandardTypedData`
- `NSString`
+ - `FlutterStandardTypedData`
- `NSArray` of supported values
- `NSDictionary` with supported keys and values
+
+ On the Dart side, these values are represented as follows:
+
+ - `nil` or `NSNull`: `null`
+ - `NSNumber`: `bool`, `int`, or `double`, depending on the contained value.
+ - `FlutterStandardBigInteger`: `int`
+ - `NSString`: `String`
+ - `FlutterStandardTypedData`: `Uint8List`, `Int32List`, `Int64List`, or `Float64List`
+ - `NSArray`: `List`
+ - `NSDictionary`: `Map`
*/
FLUTTER_EXPORT
@interface FlutterStandardMessageCodec : NSObject
@@ -308,7 +337,13 @@ FLUTTER_EXPORT
/**
A `FlutterMethodCodec` using UTF-8 encoded JSON method calls and result
- envelopes. Values supported as methods arguments and result payloads are
+ envelopes.
+
+ This codec is guaranteed to be compatible with the corresponding
+ [JSONMethodCodec](https://docs.flutter.io/flutter/services/JSONMethodCodec-class.html)
+ on the Dart side. These parts of the Flutter SDK are evolved synchronously.
+
+ Values supported as methods arguments and result payloads are
those supported as top-level or leaf values by `FlutterJSONMessageCodec`.
*/
FLUTTER_EXPORT
@@ -318,9 +353,9 @@ FLUTTER_EXPORT
/**
A `FlutterMethodCodec` using the Flutter standard binary encoding.
- The standard codec is guaranteed to be compatible with the corresponding
- standard codec for PlatformMethodChannels on the Flutter side. These parts of
- the Flutter SDK are evolved synchronously.
+ This codec is guaranteed to be compatible with the corresponding
+ [StandardMethodCodec](https://docs.flutter.io/flutter/services/StandardMethodCodec-class.html)
+ on the Dart side. These parts of the Flutter SDK are evolved synchronously.
Values supported as method arguments and result payloads are those supported by
`FlutterStandardMessageCodec`.