Fixes the crash reported in #397: Scaffold.of() called with a context that does not contain a Scaffold.
Scaffold.of(context) was called in the onPressed of the bottom-nav menu IconButton using the widget's own build context. That context is the parent of the Scaffold being returned, so Flutter correctly throws.
Fix: wrap the IconButton in a Builder, which provides a child ctx that is a proper descendant of the Scaffold. Scaffold.of(ctx) then resolves correctly.
Test plan
Run app with bottom menu position enabled, tap the hamburger icon — drawer opens without crashing.
Run app with top menu position — no regression (bottom nav is not rendered).
## Summary
Fixes the crash reported in #397: `Scaffold.of() called with a context that does not contain a Scaffold.`
- `Scaffold.of(context)` was called in the `onPressed` of the bottom-nav menu `IconButton` using the widget's own `build` context. That context is the *parent* of the `Scaffold` being returned, so Flutter correctly throws.
- Fix: wrap the `IconButton` in a `Builder`, which provides a child `ctx` that is a proper descendant of the `Scaffold`. `Scaffold.of(ctx)` then resolves correctly.
## Test plan
- [ ] Run app with bottom menu position enabled, tap the hamburger icon — drawer opens without crashing.
- [ ] Run app with top menu position — no regression (bottom nav is not rendered).
Closes #397
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Fixes the crash reported in #397:
Scaffold.of() called with a context that does not contain a Scaffold.Scaffold.of(context)was called in theonPressedof the bottom-nav menuIconButtonusing the widget's ownbuildcontext. That context is the parent of theScaffoldbeing returned, so Flutter correctly throws.IconButtonin aBuilder, which provides a childctxthat is a proper descendant of theScaffold.Scaffold.of(ctx)then resolves correctly.Test plan
Closes #397
🤖 Generated with Claude Code