SfCartesianChart constructor Null safety

SfCartesianChart(
  1. {Key? key,
  2. Color? backgroundColor,
  3. bool enableSideBySideSeriesPlacement = true,
  4. Color borderColor = Colors.transparent,
  5. double borderWidth = 0,
  6. Color? plotAreaBackgroundColor,
  7. Color? plotAreaBorderColor,
  8. double plotAreaBorderWidth = 0.7,
  9. ImageProvider<Object>? plotAreaBackgroundImage,
  10. ChartTooltipCallback? onTooltipRender,
  11. ChartActualRangeChangedCallback? onActualRangeChanged,
  12. @deprecated ChartAxisLabelRenderCallback? onAxisLabelRender,
  13. ChartDataLabelRenderCallback? onDataLabelRender,
  14. ChartLegendRenderCallback? onLegendItemRender,
  15. ChartTrackballCallback? onTrackballPositionChanging,
  16. ChartCrosshairCallback? onCrosshairPositionChanging,
  17. ChartZoomingCallback? onZooming,
  18. ChartZoomingCallback? onZoomStart,
  19. ChartZoomingCallback? onZoomEnd,
  20. ChartZoomingCallback? onZoomReset,
  21. @deprecated ChartPointTapCallback? onPointTapped,
  22. ChartAxisLabelTapCallback? onAxisLabelTapped,
  23. DataLabelTapCallback? onDataLabelTapped,
  24. ChartTrendlineRenderCallback? onTrendlineRender,
  25. ChartLegendTapCallback? onLegendTapped,
  26. ChartSelectionCallback? onSelectionChanged,
  27. ChartTouchInteractionCallback? onChartTouchInteractionUp,
  28. ChartTouchInteractionCallback? onChartTouchInteractionDown,
  29. ChartTouchInteractionCallback? onChartTouchInteractionMove,
  30. ChartMarkerRenderCallback? onMarkerRender,
  31. bool isTransposed = false,
  32. bool enableAxisAnimation = false,
  33. List<CartesianChartAnnotation>? annotations,
  34. LoadMoreViewBuilderCallback? loadMoreIndicatorBuilder,
  35. ChartPlotAreaSwipeCallback? onPlotAreaSwipe,
  36. List<Color> palette = const <Color>[Color.fromRGBO(75, 135, 185, 1), Color.fromRGBO(192, 108, 132, 1), Color.fromRGBO(246, 114, 128, 1), Color.fromRGBO(248, 177, 149, 1), Color.fromRGBO(116, 180, 155, 1), Color.fromRGBO(0, 168, 181, 1), Color.fromRGBO(73, 76, 162, 1), Color.fromRGBO(255, 205, 96, 1), Color.fromRGBO(255, 240, 219, 1), Color.fromRGBO(238, 238, 238, 1)],
  37. ChartLabelFormatterCallback? axisLabelFormatter,
  38. ChartAxis? primaryXAxis,
  39. ChartAxis? primaryYAxis,
  40. EdgeInsets? margin,
  41. TooltipBehavior? tooltipBehavior,
  42. ZoomPanBehavior? zoomPanBehavior,
  43. Legend? legend,
  44. SelectionType? selectionType,
  45. ActivationMode? selectionGesture,
  46. bool? enableMultiSelection,
  47. CrosshairBehavior? crosshairBehavior,
  48. TrackballBehavior? trackballBehavior,
  49. dynamic series,
  50. ChartTitle? title,
  51. List<ChartAxis>? axes,
  52. List<TechnicalIndicators>? indicators}
)

Creating an argument constructor of SfCartesianChart class.

Implementation

SfCartesianChart(
    {Key? key,
    this.backgroundColor,
    this.enableSideBySideSeriesPlacement = true,
    this.borderColor = Colors.transparent,
    this.borderWidth = 0,
    this.plotAreaBackgroundColor,
    this.plotAreaBorderColor,
    this.plotAreaBorderWidth = 0.7,
    this.plotAreaBackgroundImage,
    this.onTooltipRender,
    this.onActualRangeChanged,
    //ignore: deprecated_member_use_from_same_package
    @deprecated this.onAxisLabelRender,
    this.onDataLabelRender,
    this.onLegendItemRender,
    this.onTrackballPositionChanging,
    this.onCrosshairPositionChanging,
    this.onZooming,
    this.onZoomStart,
    this.onZoomEnd,
    this.onZoomReset,
    @deprecated this.onPointTapped,
    this.onAxisLabelTapped,
    this.onDataLabelTapped,
    this.onTrendlineRender,
    this.onLegendTapped,
    this.onSelectionChanged,
    this.onChartTouchInteractionUp,
    this.onChartTouchInteractionDown,
    this.onChartTouchInteractionMove,
    this.onMarkerRender,
    this.isTransposed = false,
    this.enableAxisAnimation = false,
    this.annotations,
    this.loadMoreIndicatorBuilder,
    this.onPlotAreaSwipe,
    this.palette = const <Color>[
      Color.fromRGBO(75, 135, 185, 1),
      Color.fromRGBO(192, 108, 132, 1),
      Color.fromRGBO(246, 114, 128, 1),
      Color.fromRGBO(248, 177, 149, 1),
      Color.fromRGBO(116, 180, 155, 1),
      Color.fromRGBO(0, 168, 181, 1),
      Color.fromRGBO(73, 76, 162, 1),
      Color.fromRGBO(255, 205, 96, 1),
      Color.fromRGBO(255, 240, 219, 1),
      Color.fromRGBO(238, 238, 238, 1)
    ],
    this.axisLabelFormatter,
    ChartAxis? primaryXAxis,
    ChartAxis? primaryYAxis,
    EdgeInsets? margin,
    TooltipBehavior? tooltipBehavior,
    ZoomPanBehavior? zoomPanBehavior,
    Legend? legend,
    SelectionType? selectionType,
    ActivationMode? selectionGesture,
    bool? enableMultiSelection,
    CrosshairBehavior? crosshairBehavior,
    TrackballBehavior? trackballBehavior,
    dynamic series,
    ChartTitle? title,
    List<ChartAxis>? axes,
    List<TechnicalIndicators<dynamic, dynamic>>? indicators})
    : primaryXAxis = primaryXAxis ?? NumericAxis(),
      primaryYAxis = primaryYAxis ?? NumericAxis(),
      title = title ?? ChartTitle(),
      axes = axes ?? <ChartAxis>[],
      series = series ?? <ChartSeries<dynamic, dynamic>>[],
      margin = margin ?? const EdgeInsets.all(10),
      zoomPanBehavior = zoomPanBehavior ?? ZoomPanBehavior(),
      tooltipBehavior = tooltipBehavior ?? TooltipBehavior(),
      crosshairBehavior = crosshairBehavior ?? CrosshairBehavior(),
      trackballBehavior = trackballBehavior ?? TrackballBehavior(),
      legend = legend ?? Legend(),
      selectionType = selectionType ?? SelectionType.point,
      selectionGesture = selectionGesture ?? ActivationMode.singleTap,
      enableMultiSelection = enableMultiSelection ?? false,
      indicators = indicators ?? <TechnicalIndicators<dynamic, dynamic>>[],
      super(key: key);