genericConditional<T> function

T? genericConditional<T>({
  1. required bool condition,
  2. required T match,
  3. T? notMatch,
})

Method util uses to return anything for conditional.

Implementation

T? genericConditional<T>({
  required bool condition,
  required T match,
  T? notMatch,
}) {
  return condition ? match : notMatch;
}