Tag class

Inheritance

Constructors

Tag(String tag, {Entity? entity, bool value = true})
A tag saves a boolean value with an entity inside the game.
Tag.add(String tag, {Entity? entity})
adds Tag to Entity
Tag.remove(String tag, {Entity? entity})
adds Tag to Entity

Properties

called bool
Contains the Information, if this RestAction is already called (and can't be called again)
getter/setter pairinherited
entity Entity
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tag String
getter/setter pair
value bool
getter/setter pair
writable List<Widget>?
The writable list the RestAction writes it's contents on
getter/setter pairinherited

Methods

add() Tag
generate(Context context) Widget
override
getCommand() Command
getEntity() String
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
not() Tag
queue([List<Widget>? writable]) → void
Execute this method to add this to the WidgetList (can use default list or as parameter given list) This method can only be executed once, if it is executed multiple times you will get an Error. You can read out if it is already executed in the boolean Called Example for a queue method:
inherited
remove() Tag
removeIfExists({Widget? then}) If
The removeIfExists method removes the tag and may execute some action before if the tag exists.
toggle({String temp = 'objd_temp'}) Widget
With the toggle method you can toggle the value(invert the tag). This is done with a temporary tag:
toMap() → dynamic
inherited
toString() String
A string representation of this object.
inherited

Operators

operator &(bool other) Condition
Checks if the Tag is a certain value and returns a Condition to use in If.
operator ==(Object other) bool
The equality operator.
inherited
operator >>(bool other) Tag
Assignees a new boolean value to the Tag(removes or adds the tag).

Static Properties

prefix String?
Often you find yourself giving all tags a prefix especially for your project. This can get very repetitive and annoying, so objD has this prefix built in.
getter/setter pair