TechnicalIndicators<T, D> constructor

TechnicalIndicators<T, D>({
  1. bool? isVisible,
  2. String? xAxisName,
  3. String? yAxisName,
  4. String? seriesName,
  5. List<double>? dashArray,
  6. double? animationDuration,
  7. double? animationDelay,
  8. List<T>? dataSource,
  9. ChartValueMapper<T, D>? xValueMapper,
  10. ChartValueMapper<T, num>? lowValueMapper,
  11. ChartValueMapper<T, num>? highValueMapper,
  12. ChartValueMapper<T, num>? openValueMapper,
  13. ChartValueMapper<T, num>? closeValueMapper,
  14. String? name,
  15. ChartIndicatorRenderCallback? onRenderDetailsUpdate,
  16. bool? isVisibleInLegend,
  17. LegendIconType? legendIconType,
  18. String? legendItemText,
  19. Color? signalLineColor,
  20. double? signalLineWidth,
  21. int? period,
})

Creating an argument constructor of TechnicalIndicators class.

Implementation

TechnicalIndicators(
    {bool? isVisible,
    this.xAxisName,
    this.yAxisName,
    this.seriesName,
    List<double>? dashArray,
    double? animationDuration,
    double? animationDelay,
    this.dataSource,
    ChartValueMapper<T, D>? xValueMapper,
    ChartValueMapper<T, num>? lowValueMapper,
    ChartValueMapper<T, num>? highValueMapper,
    ChartValueMapper<T, num>? openValueMapper,
    ChartValueMapper<T, num>? closeValueMapper,
    this.name,
    this.onRenderDetailsUpdate,
    bool? isVisibleInLegend,
    LegendIconType? legendIconType,
    this.legendItemText,
    Color? signalLineColor,
    double? signalLineWidth,
    int? period})
    : isVisible = isVisible ?? true,
      dashArray = dashArray ?? <double>[0, 0],
      animationDuration = animationDuration ?? 1500,
      animationDelay = animationDelay ?? 0,
      isVisibleInLegend = isVisibleInLegend ?? true,
      legendIconType = legendIconType ?? LegendIconType.seriesType,
      signalLineColor = signalLineColor ?? Colors.blue,
      signalLineWidth = signalLineWidth ?? 2,
      period = period ?? 14,
      xValueMapper = (xValueMapper != null)
          ? ((int index) => xValueMapper(dataSource![index], index))
          : null,
      lowValueMapper = (lowValueMapper != null)
          ? ((int index) => lowValueMapper(dataSource![index], index))
          : null,
      highValueMapper = (highValueMapper != null)
          ? ((int index) => highValueMapper(dataSource![index], index))
          : null,
      openValueMapper = (openValueMapper != null)
          ? ((int index) => openValueMapper(dataSource![index], index))
          : null,
      closeValueMapper = (closeValueMapper != null)
          ? ((int index) => closeValueMapper(dataSource![index], index))
          : null;