Moved the default BinaryMessenger instance to ServicesBinding (#38464)

* Moved the default BinaryMessenger instance to ServicesBinding

This reverts commit 821602aef3.

* Added assertion in defaultBinaryMessenger. Also fixed the devicelab tests.
This commit is contained in:
adazh
2019-08-21 16:47:42 -07:00
committed by GitHub
parent ddb10dd9d1
commit 93c32c4ff6
32 changed files with 251 additions and 158 deletions

View File

@@ -25,6 +25,8 @@ const BasicMessageChannel<String> _kReloadChannel =
BasicMessageChannel<String>(_kReloadChannelName, StringCodec());
void main() {
// Ensures bindings are initialized before doing anything.
WidgetsFlutterBinding.ensureInitialized();
// Start listening immediately for messages from the iOS side. ObjC calls
// will be made to let us know when we should be changing the app state.
_kReloadChannel.setMessageHandler(run);