Closed AgustinV08 closed 2 years ago
When using this package and trying to implement the Zoom Drawer class and toggle the state with a button, the static function returns null.
Here's my code
@override Widget build(BuildContext context) { return ZoomDrawer( menuScreen: const LeasyMenuScreen(), mainScreen: Scaffold( appBar: AppBar( leading: IconButton( onPressed: () { ZoomDrawer.of(context)!.isOpen(); }, icon: const Icon(Icons.menu), ), ), body: SafeArea( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: const [ Text('Home Page'), ], ), ), ), ); }
@AgustinV08 Wrap your IconButton with a Builder widget, and use the builder context to access the ZoomDrawer
IconButton
Builder
ZoomDrawer
When using this package and trying to implement the Zoom Drawer class and toggle the state with a button, the static function returns null.
Here's my code