mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
closes flutter/flutter#53107 This PR introduces support for `AppLifecycleState` on Web, aligning the web's lifecycle events with those of the mobile platforms. This ensures a more consistent developer experience and better lifecycle management across all platforms. **PR includes:** - Page Visibility Handling: Integrated the `visibilitychange` DOM event to determine if the app is in a `resumed` or `paused` state based on the visibility state of the document. - Page Transition Handling: Used `beforeunload` events to better manage the `detached` state. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style