Notice
Recent Posts
Recent Comments
Link
250x250
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- tabbar
- 테스트
- CustomScrollView
- 앱
- viewmodel
- textfield
- Coroutines
- Compose
- 계측
- android
- livedata
- Dialog
- scroll
- binding
- TEST
- data
- ScrollView
- Kotlin
- Navigation
- 안드로이드
- activity
- textview
- DART
- Flutter
- Button
- drift
- LifeCycle
- 앱바
- appbar
- intent
Archives
- Today
- Total
Study Record
[Flutter] SafeArea 본문
728x90
🎁 SafeArea Widget
안드로이드와 아이폰에 있는 상태바나 홈버튼 부분(아이폰만 존재)을 없앨 수 있는 위젯이다.
argments
- top: [ true / false ] : 상태바 부분을 포함하지 않는다.
- bottom [ true / false ] : 홈버튼 부분을 포함하지 않는다.
예시 )
void main() {
runApp(
MaterialApp(
home: HomeScreen();
)
);
}
class HomeScreen extends StatelessWidget {
const HomeScreen({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: const Color(0xFFFF8E83),
body: SafeArea(
bottom: true,
top: true,
child: Container(
color: Colors.black,
child: Container(
color: Colors.red,
width: 50.0,
height: 50.0,
),
),
));
}
}
728x90
'Flutter > widget' 카테고리의 다른 글
[Flutter] 앱바 (appbar) (0) | 2023.04.19 |
---|---|
[Flutter] 슬라이드 메뉴(Drawer) (0) | 2023.03.17 |
[Flutter] focus 해제/요청하기, 키보드 내리기 (TextField) (0) | 2023.02.26 |
[Flutter] 바텀 시트 (showModalBottomSheet) (0) | 2023.02.23 |
[Flutter] 하위 항목 자동 줄바꿈 (Wrap Widget) (0) | 2023.02.22 |