withProperty method

dynamic withProperty(
  1. PropertySchema schema
)
inherited

Adds a validation schema for an object property.

This method returns reference to this exception to implement Builder pattern to chain additional calls.

  • schema a property validation schema to be added. Returns this validation schema.

See PropertySchema

Implementation

dynamic withProperty(PropertySchema schema) {
  _properties = _properties ?? <PropertySchema>[];
  _properties!.add(schema);
  return this;
}