The lifecycle has the following simplified steps: createState() mounted == true . initState()
Read moreWhat is mounted in Flutter?
mounted property Null safety After creating a State object and before calling initState, the framework “mounts” the State object by associating it with a BuildContext . The State object remains mounted until the framework calls dispose, after which time the framework will never ask the State object to build again.
Read moreWhy we use mounted in Flutter?
The mounted property helps to avoid the error, when you trying to call setState before build . you don’t need a boolean operator to check a boolean value.3 Şub 2019
Read more