This reverts commit 92ef2b9ce1.
This requires either runApp() or
WidgetsFlutterBinding.ensureInitialized() to have been called before
using any MethodChannels. Plugins broadly rely on MethodChannels and
right now there's no general requirements that they be constructed
within the runApp call, so the ecosystem breakages from this are broader
than originally thought. Reverting for now.
This commit is contained in:
committed by
GitHub
parent
77e15103da
commit
821602aef3
@@ -11,6 +11,6 @@ void main() {
|
||||
Ticker((Duration duration) { })..start();
|
||||
|
||||
final ByteData message = const StringCodec().encodeMessage('AppLifecycleState.paused');
|
||||
await ServicesBinding.instance.defaultBinaryMessenger.handlePlatformMessage('flutter/lifecycle', message, (_) {});
|
||||
await defaultBinaryMessenger.handlePlatformMessage('flutter/lifecycle', message, (_) {});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user