SfFunnelChart constructor Null safety

SfFunnelChart(
  1. {Key? key,
  2. Color? backgroundColor,
  3. ImageProvider<Object>? backgroundImage,
  4. Color borderColor = Colors.transparent,
  5. double borderWidth = 0.0,
  6. FunnelLegendRenderCallback? onLegendItemRender,
  7. FunnelTooltipCallback? onTooltipRender,
  8. FunnelDataLabelRenderCallback? onDataLabelRender,
  9. FunnelPointTapCallback? onPointTapped,
  10. ChartLegendTapCallback? onLegendTapped,
  11. DataLabelTapCallback? onDataLabelTapped,
  12. FunnelSelectionCallback? onSelectionChanged,
  13. FunnelTouchInteractionCallback? onChartTouchInteractionUp,
  14. FunnelTouchInteractionCallback? onChartTouchInteractionDown,
  15. FunnelTouchInteractionCallback? onChartTouchInteractionMove,
  16. ChartTitle? title,
  17. FunnelSeries? series,
  18. EdgeInsets? margin,
  19. Legend? legend,
  20. 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)],
  21. TooltipBehavior? tooltipBehavior,
  22. SmartLabelMode? smartLabelMode,
  23. ActivationMode? selectionGesture,
  24. bool? enableMultiSelection}
)

Creating an argument constructor of SfFunnelChart class.

Implementation

SfFunnelChart({
  Key? key,
  this.backgroundColor,
  this.backgroundImage,
  this.borderColor = Colors.transparent,
  this.borderWidth = 0.0,
  this.onLegendItemRender,
  this.onTooltipRender,
  this.onDataLabelRender,
  this.onPointTapped,
  this.onLegendTapped,
  this.onDataLabelTapped,
  this.onSelectionChanged,
  this.onChartTouchInteractionUp,
  this.onChartTouchInteractionDown,
  this.onChartTouchInteractionMove,
  ChartTitle? title,
  FunnelSeries<dynamic, dynamic>? series,
  EdgeInsets? margin,
  Legend? legend,
  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)
  ],
  TooltipBehavior? tooltipBehavior,
  SmartLabelMode? smartLabelMode,
  ActivationMode? selectionGesture,
  bool? enableMultiSelection,
})  : title = title ?? ChartTitle(),
      series = series ?? FunnelSeries<dynamic, dynamic>(),
      margin = margin ?? const EdgeInsets.fromLTRB(10, 10, 10, 10),
      legend = legend ?? Legend(),
      tooltipBehavior = tooltipBehavior ?? TooltipBehavior(),
      smartLabelMode = smartLabelMode ?? SmartLabelMode.hide,
      selectionGesture = selectionGesture ?? ActivationMode.singleTap,
      enableMultiSelection = enableMultiSelection ?? false,
      super(key: key);