'Why cant I find my drawer? It literally pops open when swiping

My drawer opens perfectly fine when swiping so I know that there is one there. However the below says different:

print('Has drawer');
print(Scaffold.of(context).hasDrawer);
print('ancestor scaffold');
print(Scaffold.maybeOf(context)?.hasDrawer);

Result:

Has drawer
false
ancestor scaffold
false

Where can it be? How can I access it via a button instead of swiping?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source