Greg Spencer 4eebfb2246 [linux] Wait for binding to be ready before requesting exits from framework (flutter/engine#41782)
## Description

Similar to https://github.com/flutter/engine/pull/41733 and https://github.com/flutter/engine/pull/41753 this causes the linux embedding to wait until it hears that the scheduler binding has registered itself before proceeding to send termination requests to the framework.

This allows applications that don't use the framework (just use `dart:ui` directly) to exit automatically when the last window is closed.  Without this change, the app does not exit when the window is closed.

Depends on framework PR https://github.com/flutter/flutter/pull/126075 landing first.

## Related PRs
 - https://github.com/flutter/engine/pull/41733
 - https://github.com/flutter/engine/pull/41753

## Related Issues
 - https://github.com/flutter/flutter/issues/126033.

## Tests
 - Added a test to make sure that it doesn't send a termination request if the binding hasn't notified that it is ready yet.
2023-05-16 20:34:05 +00:00
Languages
Dart 75%
C++ 16.5%
Objective-C++ 2.9%
Java 2.8%
Objective-C 0.7%
Other 1.9%