Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
gizemgizg opened this issue May 1, 2021 · 1 comment

Comments

@gizemgizg
Copy link

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
Copy link
Author

Problem solved. I solved my problem with BottomSheet :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant