SideDrawer<T>.custom constructor

SideDrawer<T>.custom({
  1. required SideDrawerBuilder itemBuilder,
  2. Widget? headerView,
  3. Widget? footerView,
  4. bool slide = false,
  5. double? percentage,
  6. double? degree,
  7. Color color = Colors.white,
  8. DecorationImage? background,
  9. bool animation = false,
  10. Direction direction = Direction.left,
  11. Color? selectorColor,
  12. double drawerWidth = 300,
  13. double peekSize = 56,
  14. Duration? duration,
  15. Curve? curve,
  16. TextStyle? textStyle,
  17. EdgeInsets? padding,
  18. Alignment alignment = Alignment.centerLeft,
  19. double elevation = 16,
  20. double? cornerRadius,
  21. bool withSafeAre = true,
  22. Key? key,
  23. bool peekMenu = false,
  24. bool hideOnItemPressed = true,
})

Implementation

SideDrawer.custom({
  required this.itemBuilder,
  this.headerView,
  this.footerView,
  this.slide = false,
  double? percentage,
  double? degree,
  this.color = Colors.white,
  this.background,
  this.animation = false,
  this.direction = Direction.left,
  this.selectorColor,
  this.drawerWidth = 300,
  this.peekSize = 56,
  this.duration,
  this.curve,
  this.textStyle,
  EdgeInsets? padding,
  this.alignment = Alignment.centerLeft,
  this.elevation = 16,
  this.cornerRadius,
  this.withSafeAre = true,
  Key? key,
  this.peekMenu = false,
  this.hideOnItemPressed = true,
})  : menu = null,
      selectedItemId = null,
      onMenuItemSelected = null,
      child = null,
      this.percentage = percentage ?? 0.8,
      this.degree = degree == null ? null : max(min(45, degree), 15),
      this.scaleDownCurve =
          new Interval(0.0, 0.3, curve: curve ?? Curves.easeOut),
      this.scaleUpCurve =
          new Interval(0.0, 1.0, curve: curve ?? Curves.easeOut),
      this.slideOutCurve =
          new Interval(0.0, 1.0, curve: curve ?? Curves.easeOut),
      this.slideInCurve =
          new Interval(0.0, 1.0, curve: curve ?? Curves.easeOut),
      this.padding = padding ??
          (peekMenu
              ? const EdgeInsets.only(left: 16.0, top: 15.0, bottom: 15.0)
              : const EdgeInsets.only(left: 40.0, top: 15.0, bottom: 15.0)),
      super(key: key);