[Flutter] BottomAppBar()

쏘리초이·2020년 9월 2일
0

SafeArea() : https://api.flutter.dev/flutter/widgets/SafeArea-class.html
BottomAppBar() : https://api.flutter.dev/flutter/material/BottomAppBar-class.html

body에는 장문의 Text가 존재하고 있다.

💢 이슈 : Scaffold에서 파라미터인 bottomNavigationBar를 썼는데, BottomNavigationBar가 아닌 BottomAppBar()를 썼다. 근데, elevation을 설정했더니 BottomAppBar()의 상단이 아닌 하단에 그림자가 나타남.

우선, 그전에 BottomAppBar()를 SafeArea()로 감쌌기 때문에 발생한 문제점이다. SafeArea()를 제거했더니, 그림자가 없어짐.

💢 두번째 이슈 : SafeArea로 감싸주지 않으니까, bottomAppBar()가 보일땐 상관없는데 안보일때 notchi바와 bottombar영역을 침범함.

이 이슈는 우선 body의 Text영역을 SafeArea()로 감싸줘야한다. 그리고 bottomAppBar()가 빈 영역일때를 다시 SafeArea()로 감싸줘야한다.

profile
Hello Universe!

0개의 댓글