TechnicalIndicators<T, D> constructor
TechnicalIndicators<T, D> ({
- bool? isVisible,
- String? xAxisName,
- String? yAxisName,
- String? seriesName,
- List<
double> ? dashArray, - double? animationDuration,
- double? animationDelay,
- List<
T> ? dataSource, - ChartValueMapper<
T, D> ? xValueMapper, - ChartValueMapper<
T, num> ? lowValueMapper, - ChartValueMapper<
T, num> ? highValueMapper, - ChartValueMapper<
T, num> ? openValueMapper, - ChartValueMapper<
T, num> ? closeValueMapper, - String? name,
- ChartIndicatorRenderCallback? onRenderDetailsUpdate,
- bool? isVisibleInLegend,
- LegendIconType? legendIconType,
- String? legendItemText,
- Color? signalLineColor,
- double? signalLineWidth,
- 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;