Lifecycle method of Stateful widget
[Ko]
initState() : state가 initialized 될 때 1회만 호출됨. (즉, stateful widget이 만들어질 때 가장 먼저 호출됨.)
build() : widget이 실제로 만들어지고 화면에 나타나게 하기 위해 호출됨.
deactivate() : stateful widget이 destroyed 되기 직전에 호출됨.(state data save 등에 사용)
[En]
initState (): Called only once when the state is initialized. (That is, it is called first when a stateful widget is created.)
build (): called to make the widget actually build and appear on the screen.
deactivate (): called just before the stateful widget is destroyed (used for state data save, etc.)
'플러터(Flutter) > 플러터 일반(Flutter General)' 카테고리의 다른 글
Passing Data to a State Object (0) | 2020.03.19 |
---|---|
JSON Parsing and Dynamic Types (0) | 2020.03.19 |
Composition vs. Inheritance - Building Flutter Widgets From Scratch (0) | 2020.03.19 |
Extract widget and Key (0) | 2020.03.19 |
Flutter Themes, Theme widget, ThemeData (0) | 2020.03.19 |