Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- rxswift
- 한글
- SwiftUI
- Realm
- Swift
- Xcode
- JPA
- Apple
- Notification
- iOS16
- FLUTTER
- Git
- stack
- view
- Archive
- UIButton
- appstore
- darkmode
- github
- error
- IOS
- mac
- Code
- MacOS
- Firebase
- 웹뷰
- Python
- window
- 개발자
- Session
Archives
- Today
- Total
목록AutomaticKeepAliveClientMixin (1)
EEYatHo 앱 깎는 이야기
Flutter ) 탭바 돌아와도 initState 안하기 - EEYatHo Flutter
DefaultTabController 를 기반으로 탭바를 구현했을 때, 다른 탭으로 가면 기존에 보이던 화면이 dispose (deinit) 된다. 그래서 다시 돌아왔을 때는 initState 부터 시작한다. 이를 방지하기 위해, 다른 탭에가도 dispose 되지 않게 할 수 있다. Solution dispose 되지 않길 바라는 화면의 State 에 AutomaticKeepAliveClientMixin 을 Mixin 하고, wantKeepAlive 를 true 로 override 해준다. // dispose 되지 않길 바라는 화면의 State class _SomeTabState extends State with AutomaticKeepAliveClientMixin { ... // 다른 탭 갔다와도 di..
Flutter/Tip
2022. 10. 28. 17:20