isNotNull<T> function Null safety

void isNotNull<T>(
  1. T target,
  2. T? value
)

Implementation

void isNotNull<T>(T target, T? value) {
  if (value != null) {
    target = value;
  }
}