플러터 screen에서 bottom overflowed by ~~ pixels라고 뜰 때가 있다. 노란색과 검정색의 빗금이 마구 쳐져있다.
이것을 해결하기 위한 방법은,
Scaffold 하위에
body부분에
SingleChildScrollView
를 넣어주면 된다.
class MonthScreen extends StatelessWidget {
const MonthScreen({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
resizeToAvoidBottomInset : false,
body: SingleChildScrollView(child:SafeArea(
child: Column(
children: [
SizedBox(height: 8.0),
Tablecalendar(),
],
))));
}
}
다음은 에러난(?) 화면이다.
밑에를 보면 빗금 표시가 나있다.
resizetoAvoidBottomInset, singlechildscrollview를 추가해주고나니 bottom overflow가 사라졌다!


다음은 resizetoAvoidBottomInset property에 대한 설명이다...
https://api.flutter.dev/flutter/material/Scaffold/resizeToAvoidBottomInset.html
resizeToAvoidBottomInset property - Scaffold class - material library - Dart API
bool? resizeToAvoidBottomInset final If true the body and the scaffold's floating widgets should size themselves to avoid the onscreen keyboard whose height is defined by the ambient MediaQuery's MediaQueryData.viewInsets bottom property. For example, if t
api.flutter.dev
'flutter' 카테고리의 다른 글
flutter 위젯에서 조건문 사용하기 (0) | 2022.06.19 |
---|---|
flutter container click (0) | 2022.06.18 |
flutter background color 설정하기 (0) | 2022.06.17 |
provider listview builder에 적용시 문제점 (0) | 2022.06.15 |
flutter quill editor provider 적용/ 저장했던 글 불러오기 (0) | 2022.06.14 |