ModelInfo class Null safety

In order to represent the model stored in objectbox-model.json in Dart, several classes have been introduced. Conceptually, these classes are comparable to how models are handled in ObjectBox Java and ObjectBox Go. This is also why for explanations on most concepts related to ObjectBox models, you can refer to https://docs.objectbox.io/advanced.

Constructors

ModelInfo({required List<ModelEntity> entities, required IdUid lastEntityId, required IdUid lastIndexId, required IdUid lastRelationId, required IdUid lastSequenceId, required List<int> retiredEntityUids, required List<int> retiredIndexUids, required List<int> retiredPropertyUids, required List<int> retiredRelationUids, required int modelVersion, required int modelVersionParserMinimum, required int version})
ModelInfo.empty()
ModelInfo.fromMap(Map<String, dynamic> data, {bool check = true})

Properties

entities List<ModelEntity>
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
lastEntityId IdUid
read / write
lastIndexId IdUid
read / write
lastRelationId IdUid
read / write
lastSequenceId IdUid
read / write
modelVersion int
read / write
modelVersionParserMinimum int
read / write
retiredEntityUids List<int>
read / write
retiredIndexUids List<int>
read / write
retiredPropertyUids List<int>
read / write
retiredRelationUids List<int>
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
version int
read / write

Methods

containsUid(int uid) bool
createEntity(String name, [int uid = 0]) ModelEntity
createIndexId() IdUid
findEntityByName(String name) ModelEntity?
findEntityByUid(int uid) ModelEntity?
findSameEntity(ModelEntity other) ModelEntity?
generateUid() int
getEntityByUid(int uid) ModelEntity
hasRelations() bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
removeEntity(ModelEntity entity) → void
toMap({bool forModelJson = false}) Map<String, dynamic>
toString() String
A string representation of this object. [...]
inherited
validate() → void

Operators

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

Constants

notes → const List<String>
['KEEP THIS FILE! Check it into a version control system (VCS) like git.', 'ObjectBox manages crucial IDs for your object model. See docs for details.', 'If you have VCS merge conf…