Name.maybe constructor Null safety

Name.maybe(
  1. {String? input}
)

Name.maybe is used when the name is optional. Example use case; middleName

Implementation

factory Name.maybe({String? input}) {
  if (input == null) {
    return Name._(right(UNKNOWN));
  }
  return Name._(right(input));
}