ChartAxis constructor Null safety

ChartAxis(
  1. {String? name,
  2. double? plotOffset,
  3. bool? isVisible,
  4. bool? anchorRangeToVisiblePoints,
  5. AxisTitle? title,
  6. AxisLine? axisLine,
  7. ChartRangePadding? rangePadding,
  8. int? labelRotation,
  9. ChartDataLabelPosition? labelPosition,
  10. LabelAlignment? labelAlignment,
  11. TickPosition? tickPosition,
  12. MajorTickLines? majorTickLines,
  13. MinorTickLines? minorTickLines,
  14. TextStyle? labelStyle,
  15. AxisLabelIntersectAction? labelIntersectAction,
  16. int? desiredIntervals,
  17. MajorGridLines? majorGridLines,
  18. MinorGridLines? minorGridLines,
  19. int? maximumLabels,
  20. int? minorTicksPerInterval,
  21. bool? isInversed,
  22. bool? opposedPosition,
  23. EdgeLabelPlacement? edgeLabelPlacement,
  24. bool? enableAutoIntervalOnZooming,
  25. double? zoomFactor,
  26. double? zoomPosition,
  27. InteractiveTooltip? interactiveTooltip,
  28. double? interval,
  29. dynamic crossesAt,
  30. String? associatedAxisName,
  31. bool? placeLabelsNearAxisLine,
  32. List<PlotBand>? plotBands,
  33. RangeController? rangeController,
  34. double? maximumLabelWidth,
  35. double? labelsExtent,
  36. int? autoScrollingDelta,
  37. AutoScrollingMode? autoScrollingMode,
  38. double? borderWidth,
  39. Color? borderColor,
  40. AxisBorderType? axisBorderType,
  41. MultiLevelLabelStyle? multiLevelLabelStyle,
  42. MultiLevelLabelFormatterCallback? multiLevelLabelFormatter,
  43. List<ChartMultiLevelLabel>? multiLevelLabels,
  44. ChartLabelFormatterCallback? axisLabelFormatter}
)

Creating an argument constructor of ChartAxis class.

Implementation

ChartAxis(
    {this.name,
    double? plotOffset,
    bool? isVisible,
    bool? anchorRangeToVisiblePoints,
    AxisTitle? title,
    AxisLine? axisLine,
    ChartRangePadding? rangePadding,
    int? labelRotation,
    ChartDataLabelPosition? labelPosition,
    LabelAlignment? labelAlignment,
    TickPosition? tickPosition,
    MajorTickLines? majorTickLines,
    MinorTickLines? minorTickLines,
    TextStyle? labelStyle,
    AxisLabelIntersectAction? labelIntersectAction,
    this.desiredIntervals,
    MajorGridLines? majorGridLines,
    MinorGridLines? minorGridLines,
    int? maximumLabels,
    int? minorTicksPerInterval,
    bool? isInversed,
    bool? opposedPosition,
    EdgeLabelPlacement? edgeLabelPlacement,
    bool? enableAutoIntervalOnZooming,
    double? zoomFactor,
    double? zoomPosition,
    InteractiveTooltip? interactiveTooltip,
    this.interval,
    this.crossesAt,
    this.associatedAxisName,
    bool? placeLabelsNearAxisLine,
    List<PlotBand>? plotBands,
    this.rangeController,
    this.maximumLabelWidth,
    this.labelsExtent,
    this.autoScrollingDelta,
    AutoScrollingMode? autoScrollingMode,
    double? borderWidth,
    Color? borderColor,
    AxisBorderType? axisBorderType,
    MultiLevelLabelStyle? multiLevelLabelStyle,
    this.multiLevelLabelFormatter,
    this.multiLevelLabels,
    this.axisLabelFormatter})
    : isVisible = isVisible ?? true,
      anchorRangeToVisiblePoints = anchorRangeToVisiblePoints ?? true,
      interactiveTooltip = interactiveTooltip ?? const InteractiveTooltip(),
      isInversed = isInversed ?? false,
      plotOffset = plotOffset ?? 0,
      placeLabelsNearAxisLine = placeLabelsNearAxisLine ?? true,
      opposedPosition = opposedPosition ?? false,
      rangePadding = rangePadding ?? ChartRangePadding.auto,
      labelRotation = labelRotation ?? 0,
      labelPosition = labelPosition ?? ChartDataLabelPosition.outside,
      labelAlignment = labelAlignment ?? LabelAlignment.center,
      tickPosition = tickPosition ?? TickPosition.outside,
      labelIntersectAction =
          labelIntersectAction ?? AxisLabelIntersectAction.hide,
      minorTicksPerInterval = minorTicksPerInterval ?? 0,
      maximumLabels = maximumLabels ?? 3,
      labelStyle = getTextStyle(
          textStyle: labelStyle,
          fontSize: 12.0,
          fontStyle: FontStyle.normal,
          fontWeight: FontWeight.normal,
          fontFamily: 'Normal'),
      title = title ?? AxisTitle(),
      axisLine = axisLine ?? const AxisLine(),
      majorTickLines = majorTickLines ?? const MajorTickLines(),
      minorTickLines = minorTickLines ?? const MinorTickLines(),
      majorGridLines = majorGridLines ?? const MajorGridLines(),
      minorGridLines = minorGridLines ?? const MinorGridLines(),
      edgeLabelPlacement = edgeLabelPlacement ?? EdgeLabelPlacement.none,
      zoomFactor = zoomFactor ?? 1,
      zoomPosition = zoomPosition ?? 0,
      enableAutoIntervalOnZooming = enableAutoIntervalOnZooming ?? true,
      plotBands = plotBands ?? <PlotBand>[],
      autoScrollingMode = autoScrollingMode ?? AutoScrollingMode.end,
      axisBorderType = axisBorderType ?? AxisBorderType.rectangle,
      borderColor = borderColor ?? Colors.transparent,
      borderWidth = borderWidth ?? 0.0,
      multiLevelLabelStyle =
          multiLevelLabelStyle ?? const MultiLevelLabelStyle();