DoubleProperty.lazy constructor

DoubleProperty.lazy(
  1. String name,
  2. ComputePropertyValueCallback<double> computeValue,
  3. {String ifNull,
  4. bool showName: true,
  5. String unit,
  6. String tooltip,
  7. Object defaultValue: kNoDefaultValue,
  8. DiagnosticLevel level: DiagnosticLevel.info}
)

Property with a value that is computed only when needed.

Use if computing the property value may throw an exception or is expensive.

The showName and level arguments must not be null.

Implementation

DoubleProperty.lazy(
  String name,
  ComputePropertyValueCallback<double> computeValue, {
  String ifNull,
  bool showName = true,
  String unit,
  String tooltip,
  Object defaultValue = kNoDefaultValue,
  DiagnosticLevel level = DiagnosticLevel.info,
}) : assert(showName != null),
     assert(level != null),
     super.lazy(
  name,
  computeValue,
  showName: showName,
  ifNull: ifNull,
  unit: unit,
  tooltip: tooltip,
  defaultValue: defaultValue,
  level: level,
);