resolveValue<T> function Null safety

T? resolveValue<T>(
  1. T? currentValue,
  2. T? newValue
)

Implementation

T? resolveValue<T>(T? currentValue, T? newValue) {
  return newValue == null ? currentValue : newValue;
}