removeNullability function

String removeNullability(
  1. String type
)

Implementation

String removeNullability(String type) {
  if (type.endsWith('?')) {
    return type.substring(0, type.length - 1);
  }
  return type;
}