BaseDrawer.height constructor

BaseDrawer.height(
  1. {Key key,
  2. Duration duration = _drawerTransitionDuration,
  3. AxisDirection axisDirection = AxisDirection.up,
  4. Color backgroundColor = _drawerBackgroundColor,
  5. @required double height,
  6. @required Widget child,
  7. Curve curve = Curves.linearToEaseOut,
  8. Curve reverseCurve = Curves.linearToEaseOut,
  9. bool allowGesture = true,
  10. bool allowMultipleGesture = false,
  11. bool barrierDismissible = true}
)

指定高度 axisDirection 只能为 AxisDirection.up or AxisDirection.down

Implementation

BaseDrawer.height({
  Key key,
  this.duration = _drawerTransitionDuration,
  this.axisDirection = AxisDirection.up,
  this.backgroundColor = _drawerBackgroundColor,
  @required double height,
  @required this.child,
  this.curve = Curves.linearToEaseOut,
  this.reverseCurve = Curves.linearToEaseOut,
  this.allowGesture = true,
  this.allowMultipleGesture = false,
  this.barrierDismissible = true,
})  : size = Size.fromHeight(height),
      percent = 0.0,
      assert(height > 0),
      assert(
          axisDirection == AxisDirection.up ||
              axisDirection == AxisDirection.down,
          'the axisDirection must be AxisDirection.up or AxisDirection.down.'),
      assert(child != null),
      super(key: key);