shiburagi / Drawer-Behavior-Flutter

Drawer behavior is a library that provide an extra behavior on drawer, such as, move view or scaling view's height while drawer on slide.
MIT License
209 stars 36 forks source link

I cannot define body in Drawer Scaffold. So I can't use bottom navigation bar. #46

Closed gizemgizg closed 3 years ago

gizemgizg commented 3 years ago

Codes;

@override Widget build(BuildContext context) { return DrawerScaffold( appBar: AppBar( backgroundColor: Colors.transparent, elevation: 0, centerTitle: true, iconTheme: IconThemeData(color: Colors.grey.shade900), title: Text( "TEST", style: TextStyle(color: Colors.grey.shade900), ), ), drawers: [ SideDrawer( percentage: 0.9, menu: menu, direction: Direction.left, animation: true,

          //alignment: Alignment.topLeft,
          color: Theme.of(context).primaryColor,
          selectedItemId: selectedMenuItemId,
          onMenuItemSelected: (itemId) {
            setState(() {
              selectedMenuItemId = itemId;
            });
            if (itemId == 0) {
              Navigator.push(context,
                  MaterialPageRoute(builder: (context) => HomePage()));
            } else if (itemId == 1) {
            } else if (itemId == 2) {
              //signOut();
            } else if (itemId == 3) {
              signOut();
            }
          },
        ),
      ],

    bottomNavigationBar: CurvedNavigationBar(
      key: _bottomNavigationKey,
      index: 1,
      height: 50.0,
      items: <Widget>[
        Icon(
          Icons.search,
          size: 30,
          color: Colors.white,
        ),
        IconButton(
          icon: Image.asset(
            "assets/twitter.png",
            height: 50,
            width: 50,
            color: Colors.white,
          ),
          onPressed: () {},
        ),

        Icon(
          Icons.shopping_bag_outlined,
          size: 30,
          color: Colors.white,
        ),
        //Icon(Icons.call_split, size: 30),
        //Icon(Icons.perm_identity, size: 30),
      ],
      color: purplebackground,
      buttonBackgroundColor: purplebackground,
      backgroundColor: Colors.transparent,
      animationCurve: Curves.easeInOut,
      animationDuration: Duration(milliseconds: 300),
      onTap: (index) {
        setState(() {
          _page = index;
        });
      },
      letIndexChange: (index) => true,
    ),
    body: Stack(children: [
      Container(color: kPrimaryColor, child: sayfaGoster(_page))
    ]));

}

gizemgizg commented 3 years ago

Problem solved. I solved my problem with BottomSheet :)