## 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.
|constructor| |
|--|--|
|Condition| the condition |
|Then|a List of Wigets that runs on match|
|Else|a List of Widget that runs if it does not match(optional)|
|targetFilePath|force the group to use this path instead of `/objd/`|
|targetFileName|force the group to use this name instead of automatic generated names|
|encapsulate| bool whether it should create a new file |
**Example:**
```dart
If(
Condition(Entity.Player()),
Then: [
Log("true")
],
Else: [
Log("false")
]
)
⇒ execute if entity @p run say true
⇒ execute unless entity @p run say false
```
> Not Final! Will be done with tags later on.
You can also negate the Condition with `If.not`:
```dart
If.not(
Condition(Entity.Player()),
Then: [
Log("true")
]
)
⇒ execute unless entity @p run say true
```