LineSeries<T, D> constructor Null safety

LineSeries<T, D>(
  1. {ValueKey<String>? key,
  2. ChartSeriesRendererFactory<T, D>? onCreateRenderer,
  3. required List<T> dataSource,
  4. required ChartValueMapper<T, D> xValueMapper,
  5. required ChartValueMapper<T, num> yValueMapper,
  6. ChartValueMapper<T, dynamic>? sortFieldValueMapper,
  7. ChartValueMapper<T, Color>? pointColorMapper,
  8. ChartValueMapper<T, String>? dataLabelMapper,
  9. String? xAxisName,
  10. String? yAxisName,
  11. Color? color,
  12. double? width,
  13. MarkerSettings? markerSettings,
  14. EmptyPointSettings? emptyPointSettings,
  15. DataLabelSettings? dataLabelSettings,
  16. List<Trendline>? trendlines,
  17. bool? isVisible,
  18. String? name,
  19. bool? enableTooltip,
  20. List<double>? dashArray,
  21. double? animationDuration,
  22. SelectionBehavior? selectionBehavior,
  23. bool? isVisibleInLegend,
  24. LegendIconType? legendIconType,
  25. SortingOrder? sortingOrder,
  26. String? legendItemText,
  27. double? opacity,
  28. double? animationDelay,
  29. List<int>? initialSelectedDataIndexes,
  30. SeriesRendererCreatedCallback? onRendererCreated,
  31. ChartPointInteractionCallback? onPointTap,
  32. ChartPointInteractionCallback? onPointDoubleTap,
  33. ChartPointInteractionCallback? onPointLongPress,
  34. CartesianShaderCallback? onCreateShader}
)

Creating an argument constructor of LineSeries class.

Implementation

LineSeries(
    {ValueKey<String>? key,
    ChartSeriesRendererFactory<T, D>? onCreateRenderer,
    required List<T> dataSource,
    required ChartValueMapper<T, D> xValueMapper,
    required ChartValueMapper<T, num> yValueMapper,
    ChartValueMapper<T, dynamic>? sortFieldValueMapper,
    ChartValueMapper<T, Color>? pointColorMapper,
    ChartValueMapper<T, String>? dataLabelMapper,
    String? xAxisName,
    String? yAxisName,
    Color? color,
    double? width,
    MarkerSettings? markerSettings,
    EmptyPointSettings? emptyPointSettings,
    DataLabelSettings? dataLabelSettings,
    List<Trendline>? trendlines,
    bool? isVisible,
    String? name,
    bool? enableTooltip,
    List<double>? dashArray,
    double? animationDuration,
    SelectionBehavior? selectionBehavior,
    bool? isVisibleInLegend,
    LegendIconType? legendIconType,
    SortingOrder? sortingOrder,
    String? legendItemText,
    double? opacity,
    double? animationDelay,
    List<int>? initialSelectedDataIndexes,
    SeriesRendererCreatedCallback? onRendererCreated,
    ChartPointInteractionCallback? onPointTap,
    ChartPointInteractionCallback? onPointDoubleTap,
    ChartPointInteractionCallback? onPointLongPress,
    CartesianShaderCallback? onCreateShader})
    : super(
          key: key,
          onRendererCreated: onRendererCreated,
          onCreateRenderer: onCreateRenderer,
          onPointTap: onPointTap,
          onPointDoubleTap: onPointDoubleTap,
          onPointLongPress: onPointLongPress,
          name: name,
          xValueMapper: xValueMapper,
          yValueMapper: yValueMapper,
          sortFieldValueMapper: sortFieldValueMapper,
          pointColorMapper: pointColorMapper,
          dataLabelMapper: dataLabelMapper,
          dataSource: dataSource,
          xAxisName: xAxisName,
          yAxisName: yAxisName,
          color: color,
          width: width ?? 2,
          markerSettings: markerSettings,
          emptyPointSettings: emptyPointSettings,
          trendlines: trendlines,
          dataLabelSettings: dataLabelSettings,
          isVisible: isVisible,
          enableTooltip: enableTooltip,
          dashArray: dashArray,
          animationDuration: animationDuration,
          selectionBehavior: selectionBehavior,
          legendItemText: legendItemText,
          isVisibleInLegend: isVisibleInLegend,
          legendIconType: legendIconType,
          sortingOrder: sortingOrder,
          opacity: opacity,
          animationDelay: animationDelay,
          onCreateShader: onCreateShader,
          initialSelectedDataIndexes: initialSelectedDataIndexes);