nullable method

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

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) =>
    a != null && b != null && c != null && d != null
        ? this(a, b, c, d)
        : null;