DVStudioFieldSpec class
One field of a model, as Studio edits it.
The same description whether the model was compiled from a @DVModel
or designed in Studio: the generator writes one of these for every field
it reads, Studio stores one for every field somebody adds, and the
checks a write goes through are read from here either way.
Constructors
-
DVStudioFieldSpec({required String name, required String type, bool sensitive = false, List<
String> ? options, String? relation, bool unique = false, num? min, num? max, int? minLength, int? maxLength, String? pattern}) -
const
-
DVStudioFieldSpec.fromJson(Map<
Object?, Object?> json) -
A field from toJson's output.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasRules → bool
-
Whether the field carries a rule beyond its type.
no setter
- isCollection → bool
-
Whether the value is a list, set or map, kept as JSON.
no setter
- max → num?
-
final
- maxLength → int?
-
final
- min → num?
-
The smallest and largest number the field takes.
final
- minLength → int?
-
The shortest and longest text the field takes.
final
- name → String
-
final
- nullable → bool
-
Whether the field may be left empty.
no setter
-
options
→ List<
String> ? -
The values an enum field can take, stored by name.
final
- pattern → String?
-
A regular expression the whole text has to match.
final
- relation → String?
-
The model, by the name Studio lists it under, that this field holds the
key of:
userSlugholding aUser's slug.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sensitive → bool
-
Never sent to Studio, and refused when Studio sends it.
final
- type → String
-
The declared Dart type, with
?when nullable.final - unique → bool
-
No two records hold the same value here.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, Object?> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited