Skip to content

Latest commit

 

History

History
38 lines (20 loc) · 1.15 KB

Term-Explanations.md

File metadata and controls

38 lines (20 loc) · 1.15 KB

Term Explanations

Explanations of general terms and logic



1) Life Cycle

a. InitState

First Lifecycle method that is called when the widged is created. This method will be called before the build method.


b. DidChangeDependencies

Second Lifecycle method that is called directly after 'initstate'. That will be called for every dependency change.


c. DidUpdateWidget

Called whenever a configuration changes for that specific widget. That could be things like passing variables down the constructer and those variables update.
      A very common usage case is when you pass a duration for an animation controller as you then need to change the duration of that controller.


d. Deactivate

Called when object is removed from the tree. This is not dispose anything. This method can be called for example moving the widget in the widget tree using a GlobalKey.


e. Dispose

Called when object is removed from the tree permanently. One example of when its called is when you call the 'Navigator.pushReplacement' and actually replace the current widget with another one.