nullable method

T? nullable(
  1. A? a,
  2. B? b,
  3. C? c,
  4. D? d,
  5. E? e,
)

Takes nullable versions of arguments and runs the computation if all of them are not null.

Implementation

T? nullable(A? a, B? b, C? c, D? d, E? e) =>
    a != null && b != null && c != null && d != null && e != null
        ? this(a, b, c, d, e)
        : null;