If.s constructor Null safety

  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.


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