Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rensawamo/flutterlifecycle
flutter life cycle
https://github.com/rensawamo/flutterlifecycle
Last synced: 10 days ago
JSON representation
flutter life cycle
- Host: GitHub
- URL: https://github.com/rensawamo/flutterlifecycle
- Owner: rensawamo
- Created: 2024-04-02T08:43:12.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-04-23T05:35:29.000Z (7 months ago)
- Last Synced: 2024-04-23T09:57:20.978Z (7 months ago)
- Language: Dart
- Size: 44.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Check the above sample program as you run it.
# App lifecycle
![image](https://github.com/rensawamo/flutterlifecycle/assets/106803080/b80c4dda-f906-4019-aa2e-6ea7437ecba7)
- inactive : The application is displayed but is not in focus.
- paused : App transitions to background (not in the forefront) and is paused with no input possible.
- resumed : The app transitions to the foreground (returns from paused state) and the state for return processing
- detached : State for exit processing that is passed when the application exits.
# Stateful widget lifecycle
![image](https://github.com/rensawamo/flutterlifecycle/assets/106803080/16ad8c15-ce1d-4106-a1f5-7056ed263a9f)### Initial screen construction
- initState
- didChangeDependencies
- call build### When changing the state with State{}
- setState
- build### Discard screen at screen transition
- deactivate
- dispose### Change and save the source code in VSCode on the main screen and reload it hot
- didUpdateWidget
- build# Navigation Lifecycle
The following is an example of a call from Screen A to Screen B.
- didPush : Method called on the screen specified by Navigator.push() on screen A, i.e., the screen side (screen B) from which the call is made
- didPop : Method called on Screen B when Navigator.pop() is executed from Screen B.
- didPushNext : Method called on Screen A when Navigator.push() is executed from Screen A.
- didPopNext : Method called on Screen A when Navigator.pop() is executed on Screen B.