If.s constructor

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

If condition is high, 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]);