SimpleDrawer constructor

SimpleDrawer(
  1. {Direction direction = Direction.none,
  2. double? childWidth,
  3. double? childHeight,
  4. int? animationDurationInMilliseconds,
  5. Curve? animationCurve,
  6. Widget? child,
  7. double? simpleDrawerAreaHeight,
  8. double? simpleDrawerAreaWidth,
  9. Color? fadeColor,
  10. String? id,
  11. Function? onDrawerStatusChanged}
)

Implementation

SimpleDrawer(
    {this.direction = Direction.none,
    this.childWidth,
    this.childHeight,
    this.animationDurationInMilliseconds,
    this.animationCurve,
    this.child,
    this.simpleDrawerAreaHeight,
    this.simpleDrawerAreaWidth,
    this.fadeColor,
    this.id,
    this.onDrawerStatusChanged}) {
  if (id == null) {
    throw Exception("id can not be null");
  }
  if (direction == Direction.none) {
    throw Exception("direction can not be null");
  }
  if ((direction == Direction.bottom || direction == Direction.top) &&
      this.childHeight == null) {
    throw Exception(
        "childHeight must not be null for Direction.top and Direction.bottom");
  }
  if ((direction == Direction.left || direction == Direction.right) &&
      this.childWidth == null) {
    throw Exception(
        "childWidth must not be null for Direction.left and Direction.right");
  }

  SimpleDrawer._idToOnStatusChanged[this.id] = this.onDrawerStatusChanged;
}