conditional method Null safety

Expression conditional(
  1. Expression whenTrue,
  2. Expression whenFalse
)

Implementation

Expression conditional(Expression whenTrue, Expression whenFalse) =>
    BinaryExpression._(
      expression,
      BinaryExpression._(whenTrue, whenFalse, ':'),
      '?',
    );