If constructor
If(})
The if widget accepts a Condition and runs the children if the condition is true.
If just gives you an execute wrapper with if and else statements. The conditions have their own class. Example:
If(
Condition(Entity.Player()),
then: [
Log('true')
],
orElse: [
Log('false')
]
)
Implementation
If(
dynamic condition, {
required this.then,
this.orElse,
this.targetFilePath = 'objd',
this.targetFileName,
this.encapsulate = true,
this.assignTag,
this.useTag = 'objd_isTrue',
}) {
getCondition(condition);
}