Google celebrates Hispanic Heritage Month. See how.

byteDataProperty method

*[<Null safety>](*

ByteDataProperty? byteDataProperty (String name)

Returns a ByteDataProperty with name on this node.

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

Otherwise, it creates a new property initialized to the empty byte data container.

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


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