LiquidLinearProgressIndicator constructor Null safety

LiquidLinearProgressIndicator(
  1. {Key? key,
  2. double value = 0.5,
  3. Color? backgroundColor,
  4. Animation<Color>? valueColor,
  5. double? borderWidth,
  6. Color? borderColor,
  7. double? borderRadius,
  8. Widget? center,
  9. Axis direction = Axis.horizontal}
)

Implementation

LiquidLinearProgressIndicator({
  Key? key,
  double value = 0.5,
  Color? backgroundColor,
  Animation<Color>? valueColor,
  this.borderWidth,
  this.borderColor,
  this.borderRadius,
  this.center,
  this.direction = Axis.horizontal,
}) : super(
        key: key,
        value: value,
        backgroundColor: backgroundColor,
        valueColor: valueColor,
      ) {
  if (borderWidth != null && borderColor == null ||
      borderColor != null && borderWidth == null) {
    throw ArgumentError("borderWidth and borderColor should both be set.");
  }
}