Posts

Showing posts with the label Flutter Lifecycle

Flutter Lifecycle

Android   If you’re coming from the green robot development, the  Activity  lifecycle is something we had to remember so many times for every job interview: ·          onCreate. ·          onStart ·          onResume — — — — — — — — ·          onPause ·          onStop ·          (forever alone onRestart) ·          onDestroy Most of our login ended up inside the  onCreate  method: Init Views, Database, Listeners, etc. Lifecycles like  onResume  and  onPause  have a great use to know if the user is leaving the screen o coming back to. iOS If you’re #TeamApple this logic sounds so familiar and you already know the lifecycle of a UIViewController: ·          viewDidLoad ·          viewWillAppear ·          viewDidAppear — — — — — — — — — ·          viewWillDisappear ·          viewDidDisappear ·          viewDidUnload As you can see, both platform use the same (almost) amount of steps to create and destroy a screen.  viewDidLoad()  will hold a