일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- geofencing
- Firebase
- JPA
- Archive
- 이미지
- Apple
- error
- UIButton
- Session
- 개발자
- 웹뷰
- Code
- Git
- shorebird
- iOS16
- darkmode
- mac
- Notification
- SwiftUI
- MacOS
- window
- 한글
- Swift
- appstore
- rxswift
- Realm
- github
- IOS
- FLUTTER
- Xcode
- Today
- Total
목록Flutter/Tip (2)
EEYatHo 앱 깎는 이야기
DefaultTabController 를 기반으로 탭바를 구현했을 때, 다른 탭으로 가면 기존에 보이던 화면이 dispose (deinit) 된다. 그래서 다시 돌아왔을 때는 initState 부터 시작한다. 이를 방지하기 위해, 다른 탭에가도 dispose 되지 않게 할 수 있다. Solution dispose 되지 않길 바라는 화면의 State 에 AutomaticKeepAliveClientMixin 을 Mixin 하고, wantKeepAlive 를 true 로 override 해준다. // dispose 되지 않길 바라는 화면의 State class _SomeTabState extends State with AutomaticKeepAliveClientMixin { ... // 다른 탭 갔다와도 di..
1. package:flutter/foundation.dart 사용 import 'package:flutter/foundation.dart'; if (defaultTargetPlatform == TargetPlatform.iOS) { // ios } else if (defaultTargetPlatform == TargetPlatform.android) { // android } ... /// fuchsia, linux, macOS, windows 2. dart:io 사용 import 'dart:io'; if (Platform.isIOS) { // iOS } else if (Platform.isAndroid) { // android } ... /// isLinux, isMacOS, isWindows, ..