chooseName static method

String chooseName(
  1. String? name,
  2. Naming? naming, {
  3. String nullStarter = 's',
})

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);