Add binaryMessenger constructor argument to platform channels (#30406)

* Deprecates `BinaryMessages` in favor of a default instance of `BinaryMessenger`, called `defaultBinaryMessenger`
* Platform channels use the `defaultBinaryMessenger` for their binaryMessenger default argument.
This commit is contained in:
Harry Terkelsen
2019-05-28 11:18:22 -07:00
committed by GitHub
parent faec4ca361
commit 13e9bfcc94
20 changed files with 257 additions and 134 deletions

View File

@@ -11,6 +11,6 @@ void main() {
Ticker((Duration duration) { })..start();
final ByteData message = const StringCodec().encodeMessage('AppLifecycleState.paused');
await BinaryMessages.handlePlatformMessage('flutter/lifecycle', message, (_) {});
await defaultBinaryMessenger.handlePlatformMessage('flutter/lifecycle', message, (_) {});
});
}