DatumLegend<D> constructor

DatumLegend<D>({
  1. SelectionModelType? selectionModelType,
  2. LegendEntryGenerator<D>? legendEntryGenerator,
  3. MeasureFormatter? measureFormatter,
  4. MeasureFormatter? secondaryMeasureFormatter,
  5. bool? showMeasures,
  6. LegendDefaultMeasure? legendDefaultMeasure,
  7. TextStyleSpec? entryTextStyle,
})

Implementation

DatumLegend({
  SelectionModelType? selectionModelType,
  LegendEntryGenerator<D>? legendEntryGenerator,
  MeasureFormatter? measureFormatter,
  MeasureFormatter? secondaryMeasureFormatter,
  bool? showMeasures,
  LegendDefaultMeasure? legendDefaultMeasure,
  TextStyleSpec? entryTextStyle,
}) : super(
          selectionModelType: selectionModelType ?? SelectionModelType.info,
          legendEntryGenerator:
              legendEntryGenerator ?? PerDatumLegendEntryGenerator(),
          entryTextStyle: entryTextStyle) {
  // Calling the setters will automatically use non-null default values.
  this.showMeasures = showMeasures;
  this.legendDefaultMeasure = legendDefaultMeasure;
  this.measureFormatter = measureFormatter;
  this.secondaryMeasureFormatter = secondaryMeasureFormatter;
}