chooseName static method
Picks a String name based on an initial name
and naming
.
If name
is null, the name will be based on nullStarter
.
Implementation
static String chooseName(String? name, Naming? naming,
{String nullStarter = 's'}) =>
naming == Naming.reserved
? Naming.validatedName(name, reserveName: true)!
: (name == null || name.isEmpty)
? Naming.unpreferredName(nullStarter)
: Sanitizer.sanitizeSV(name);