FieldDefinition class

Definition of a data field of the schema

Constructors

FieldDefinition({required String name, required String displayName, required Type type, bool isRequired = false, dynamic defaultValue, List<String> validationRules = const [], String? description, Map<String, dynamic>? metadata})
FieldDefinition.fromJson(Map<String, dynamic> json)
Creates a FieldDefinition from JSON
factory

Properties

defaultValue → dynamic
final
description → String?
final
displayName → String
final
hashCode → int
The hash code for this object.
no setteroverride
isRequired → bool
final
metadata → Map<String, dynamic>?
final
name → String
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type → Type
final
validationRules → List<String>
final

Methods

copyWith({String? name, String? displayName, Type? type, bool? isRequired, dynamic defaultValue, List<String>? validationRules, String? description, Map<String, dynamic>? metadata}) → FieldDefinition
Copies with changes
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Converte in JSON
toString() → String
A string representation of this object.
override
validate(dynamic value) → ValidationResult
Validates a value against this definition

Operators

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