Dave
Dave

Reputation: 2018

Not seeing drawer burger icon after adding drawer

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")
          ),

Upvotes: 5

Views: 3731

Answers (1)

Diwyansh
Diwyansh

Reputation: 3514

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

Upvotes: 7

Related Questions