inblog logo
|
taker
    플러터

    BottomNavigationBar

    김인범's avatar
    김인범
    Jan 13, 2025
    BottomNavigationBar
    Contents
    IndexedStack 사용label 설정 (theme 설정하기)
     
    notion image
    notion image
    다른 클래스들도 위와 같은 방법으로 분리해놓는다.
    notion image
    screens 폴더 안에 하위 dart파일들이 MainScreens와 같은 방식이다.
     

    IndexedStack 사용

    notion image
    IndexedStack 과 항상 따라다니는 위젯
    = BottomNavigationBar
    notion image
    ※ label을 항상 붙여 줘야한다. 하지만 설정을 통해 안보이게 끔 만들것이다.

    label 설정 (theme 설정하기)

    notion image
    showSelectedLabels: false,
    showUnselectedLabels: false,
    selectedLables와 UnselectedLabels 두개를 false로 설정해주면
    label영역을 없애줍니다.
     
    바텀 네비게이션 바의 바탕색을 흰색으로 적용하려 하지만 먹히지 않습니다.
    이때는 기본으로 설정되어 있는
    바텀네비게이션바의 에니메이션 때문입니다.
    에니메이션이 안나오도록 설정해주면 됩니다. type: BottomNavigationType.fixed,
    notion image
     
     
    Share article

    taker

    RSS·Powered by Inblog