nullableTypeName property
String
nullableTypeName
returns the name with the nullable flag
Implementation
String get nullableTypeName {
if (isDynamic) {
return typeName;
}
return typeName.endsWith('?') ? typeName : '$typeName?';
}