SideDrawer<T>.custom constructor
SideDrawer<T>.custom ({
- required SideDrawerBuilder itemBuilder,
- Widget? headerView,
- bool slide = false,
- double? percentage,
- double? degree,
- Color color = Colors.white,
- DecorationImage? background,
- bool animation = false,
- Direction direction = Direction.left,
- Color? selectorColor,
- double drawerWidth = 300,
- double peekSize = 56,
- Duration? duration,
- Curve? curve,
- TextStyle? textStyle,
- EdgeInsets? padding,
- Alignment alignment = Alignment.centerLeft,
- double elevation = 16,
- double? cornerRadius,
- bool withSafeAre = true,
- Key? key,
- bool peekMenu = false,
- 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);