ReferenceLine.horizontal constructor

ReferenceLine.horizontal({
  1. required double y,
  2. required double startX,
  3. required double endX,
  4. Color color = Colors.grey,
  5. double width = 1,
  6. List<double>? dashPattern,
  7. bool showLabel = false,
  8. String? label,
  9. TextStyle? labelStyle,
})

Creates a horizontal reference line.

Implementation

factory ReferenceLine.horizontal({
  required double y,
  required double startX,
  required double endX,
  Color color = Colors.grey,
  double width = 1,
  List<double>? dashPattern,
  bool showLabel = false,
  String? label,
  TextStyle? labelStyle,
}) {
  return ReferenceLine(
    start: Offset(startX, y),
    end: Offset(endX, y),
    color: color,
    width: width,
    dashPattern: dashPattern,
    showLabel: showLabel,
    label: label,
    labelStyle: labelStyle,
  );
}