SideMenu constructor

const SideMenu({
  1. Key? key,
  2. required Widget child,
  3. Color? background,
  4. BorderRadius? radius,
  5. Icon? closeIcon = const Icon(Icons.close, color: const Color(0xFFFFFFFF)),
  6. required Widget menu,
  7. SideMenuType type = SideMenuType.shrikNRotate,
  8. double maxMenuWidth = 275.0,
  9. bool inverse = false,
  10. void onChange(
    1. bool isOpened
    )?,
})

Liquid Shrink Side Menu is compatible with Liquid ui

Create a SideMenu / Drawer


final GlobalKey<SideMenuState> _sideMenuKey = GlobalKey<SideMenuState>();

SideMenu(
   key: _sideMenuKey, // to toggle this sidemenu
   menu: buildMenu(),
   type: SideMenuType.slideNRotate, // check above images
   child: Scaffold(
       appBar: AppBar(
           leading: IconButton(
             icon: Icon(Icons.menu),
             onPressed: () {
               final _state = _sideMenuKey.currentState;
               if (_state.isOpened)
                 _state.closeDrawer(); // close side menu
               else
                 _state.openDrawer();// open side menu
             },
           ),
       ...
   ),
);

Set inverse equals true to create end sidemenu

Implementation

const SideMenu({
  Key? key,
  required this.child,
  this.background,
  this.radius,
  this.closeIcon = const Icon(
    Icons.close,
    color: const Color(0xFFFFFFFF),
  ),
  required this.menu,
  this.type = SideMenuType.shrikNRotate,
  this.maxMenuWidth = 275.0,
  bool inverse = false,
  this.onChange,
})  : assert(maxMenuWidth > 0),
      _inverse = inverse ? -1 : 1,
      super(key: key);