If.not constructor

If.not(
  1. dynamic condition, {
  2. required List<Widget> then,
  3. List<Widget>? orElse,
  4. String targetFilePath = 'objd',
  5. String? targetFileName,
  6. bool encapsulate = true,
  7. Entity? assignTag,
  8. String useTag = 'objd_isTrue',
})

You can negate the Condition with If.not:

If.not(
	Condition(Entity.Player()),
	then: [
		Log('true')
	]
)

Implementation

If.not(
  dynamic condition, {
  required this.then,
  this.orElse,
  this.targetFilePath = 'objd',
  this.targetFileName,
  this.encapsulate = true,
  this.assignTag,
  this.useTag = 'objd_isTrue',
}) {
  assert(then.isNotEmpty);
  invert = true;
  getCondition(condition);
}