Google celebrates Hispanic Heritage Month. See how.

doubleProperty method

*[<Null safety>](*

DoubleProperty? doubleProperty (String name)

Returns a DoubleProperty with name on this node.

If a DoubleProperty with name already exists and is not deleted, this method returns it.

Otherwise, it creates a new property initialized to 0.0.

Throws InspectStateError if a non-deleted property with name already exists but it is not a DoubleProperty.


DoubleProperty? doubleProperty(String name) {
  if (_writer == null) {
    return DoubleProperty.deleted();
  if (_properties.containsKey(name)) {
    if (_properties[name] is! DoubleProperty) {
      throw InspectStateError("Can't create DoubleProperty named $name;"
          ' a different type exists.');
    return _properties[name] as DoubleProperty?;
  return _properties[name] = DoubleProperty._(name, this, _writer!);