简体   繁体   中英

Flutter equivalents to `View::onAttachedToWindow` and `View::onDetachedFromWindow`

What are Flutter equivalents to Android's View::onAttachedToWindow and View::onDetachedFromWindow ?

Basically, in Flutter, how to determine if user can see a particular widget on screen or is it covered, for example, with another screen on top?

Flutter seem to have limited lifecycle events. Maybe what you're looking for can be achieved by overriding initState() and deactivate() . Checkout widget lifecycle here for more info

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM