title: How to check when my widget screen comes to visibility in flutter like onResume in Android
body: <p>In android if an activity is visible <code>onResume</code> is called. What is the equivalent method of <code>onResume</code> in <strong>Flutter</strong>?   </p>
  
  <p>I need the know when my widget screen is visible so I can auto-play a video based on that. I might go to another widget screen an when I come back it should auto-play.   </p>
  
  <p>My approach was to play the video in <code>didUpdateWidget</code> but <code>didUpdateWidget</code> is called every-time even the widget screen is not visible.   </p>
  
  <p><strong>Note:</strong> I'm not asking about <code>didChangeAppLifecycleState</code> from <code>WidgetsBindingObserver</code> as it gives <code>onResume</code> etc callbacks for the app lifecycle not a particular widget screen.   </p>