Model class

Model is a representation of some domain object, which we want to have shown at the admin panel

Available extensions
Annotations
  • @autoequal
  • @CopyWith()
  • @JsonSerializable()

Constructors

Model({required String name, required String icon, required List<List<Field>> fields, bool isCollection = true, int sort = 0, bool showInMenu = true, String? id, bool codeFirstEntity = true, bool isHybrid = false})
Model.empty()
factory
Model.fromJson(dynamic json)
factory
Model.initialCollection()
factory
Model.initialSolo()
factory

Properties

codeFirstEntity bool
This field will always being true if model is created from the code and always being false if it is a dynamic model, created via admin panel ans stored on the backend side
final
dynamicFields List<String>
latefinal
fields List<List<Field>>
final
flattenFields List<Field>
latefinal
hashCode int
The hash code for this object.
no setterinherited
icon String
final
id String
final
idField IdField
latefinal
isCollection bool
final
isHybrid bool
final
listFields List<Field>
latefinal
name String
final
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showInMenu bool
final
sort int
final
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited

Methods

createEmptyData() → Json
deepClone() Model
fieldById(String fieldId) Field?
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Json
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

iconPropertyName String
getter/setter pair
idPropertyName String
getter/setter pair
isCollectionPropertyName String
getter/setter pair
namePropertyName String
getter/setter pair
showInMenuPropertyName String
getter/setter pair
sortPropertyName String
getter/setter pair