How do I change icon in AppBar in Flutter

Solution for How do I change icon in AppBar in Flutter
is Given Below:

I am just wondering what do I need to type here in “context”. I just want when I click on sidedrawer that it opens that’s it. But don’t know what to type here…

enter image description here

Try to use GlobalKey:

final GlobalKey<ScaffoldState> _key = GlobalKey();

...

Scaffold(
  key: _key,
  appBar: AppBar(
    leading: IconButton(
      onPressed: () => _key.currentState!.openDrawer(),