앱 화면이 상태바 때문인지 화면이 잘렸다.
메시지 아이콘이 상태바랑 딱 붙어있어서 보기에도 좋지 않았고 터치하기 불편하였다.
@override
Widget build(BuildContext context) {
final double statusBarHeight = MediaQuery.of(context).padding.top; //상태바 크기 가져오기
double deviceWidth = MediaQuery.of(context).size.width; // 앱 화면 넓이 가져오기
double deviceheight = MediaQuery.of(context).size.height; // 앱 화면 높이 가져오기
}
시스템 정보들을 알려주는 MediaQuery를 사용하여 구할 수 있다.
'Flutter' 카테고리의 다른 글
[Flutter] java.lang.RuntimeException : Unable to instantiate activity ComponentInfo 해결 (0) | 2023.02.07 |
---|---|
[Flutter] Execution failed for task ':app:compileDebugKotlin'. 해결 (0) | 2023.02.07 |
[Flutter] firebase에 이미지 저장하기 (0) | 2022.12.19 |
[Flutter] Firebase 자동 ID인 문서 가져오기 (0) | 2022.12.17 |
[Flutter] 'com.android.tools.build.gradle-7.0.2' is invalid. 문제해결 (0) | 2022.05.27 |