If.s constructor Null safety

If.s(
  1. Logic condition,
  2. Conditional then,
  3. [Conditional? orElse]
)

If condition is 1, then then is excutes, otherwise orElse is executed.

Use this constructor when you only have a single then condition. An optional orElse condition can be passed.

Implementation

If.s(Logic condition, Conditional then, [Conditional? orElse])
    : this(condition, then: [then], orElse: orElse == null ? [] : [orElse]);