DoubleProperty<T> constructor

DoubleProperty<T>({
  1. required ConversionNode<T> conversionTree,
  2. Map<T, String>? mapSymbols,
  3. dynamic name,
  4. int significantFigures = 10,
  5. bool removeTrailingZeros = true,
  6. bool useScientificNotation = true,
})

Implementation

DoubleProperty(
    {required this.conversionTree,
    this.mapSymbols,
    name,
    this.significantFigures = 10,
    this.removeTrailingZeros = true,
    this.useScientificNotation = true}) {
  this.name = name;
  _nodeList = _getTreeAsList();
  _mapUnits = {for (var node in _nodeList) node.name: node};
  size = _nodeList.length;
  for (var conversionNode in _nodeList) {
    _unitList.add(
        Unit(conversionNode.name, symbol: mapSymbols?[conversionNode.name]));
  }
}