Home > Mobile >  Not seeing drawer burger icon after adding drawer
Not seeing drawer burger icon after adding drawer

Time:12-24

I am trying to add a drawer which should open a side menu to full screen. However after adding drawer I don't see the drawer icon at all. What am I doing wrong?

My code:

  @override
  Widget build(BuildContext context) {
    return SafeArea(
      child: Scaffold(
        appBar: AppBar(
          automaticallyImplyLeading: false,
          title: const Text("Nav", style: TextStyle(
            color: Colors.black
          )),
          centerTitle: true,
          flexibleSpace: Image(
            image: AssetImage('assets/images/bg.jpg'),
            fit: BoxFit.cover,
          ),
          bottomOpacity: 0,
          elevation: 2,
          backgroundColor: Colors.transparent,
        ),
          drawer: Drawer(
            child: Text("Test")
          ),

CodePudding user response:

You are not able so see that Icon because you have set automaticallyImplyLeading to false, just change it to true or delete the line and your the Icon will appear

automaticallyImplyLeading: true, //even can remove this line
  • Related