DataSchema class abstract

Abstract schema that defines the data structure

Constructors

DataSchema()
const
DataSchema.fromClass(Type type)
Creates a schema from a generic class (reflection-based)
factory
DataSchema.fromJson(Map<String, dynamic> json)
Creates a schema from JSON
factory

Properties

description → String
no setter
displayName → String
no setter
fields → List<FieldDefinition>
no setter
hashCode → int
The hash code for this object.
no setterinherited
metadata → Map<String, dynamic>
no setter
name → String
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sampleData → Map<String, dynamic>
no setter

Methods

getField(String name) → FieldDefinition?
Finds a field definition by name
getFieldNames() → List<String>
Returns all available field names
getFieldsByType(Type type) → List<FieldDefinition>
Returns the fields of a given type
getRequiredFields() → List<FieldDefinition>
Returns only the required fields
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Converts the schema to JSON
toString() → String
A string representation of this object.
inherited
validate(dynamic data) → ValidationResult
Validates a data object against this schema
validateList(List dataList) → ValidationResult
Validates a list of data objects

Operators

operator ==(Object other) → bool
The equality operator.
inherited