patternProperties property

Map<String, Schema>? get patternProperties

A map of the property patterns of the object to the nested Schemas for those properties.

For example, to define a schema where any property name starting with "x-" should have a string value:

final schema = ObjectSchema(patternProperties: {r'^x-': Schema.string()});

Implementation

Map<String, Schema>? get patternProperties =>
    (_value['patternProperties'] as Map?)?.cast<String, Schema>();