PhoneValue class final
Immutable domain value object representing a validated phone number string.
- Inheritance
-
- Object
- ValueObject<
String> - PhoneValue
- Annotations
-
- @immutable
Constructors
- PhoneValue(String input, [PhoneValidationConfig config = const PhoneValidationConfig()])
-
Constructs a PhoneValue from a trusted input string.
Throws ValueObjectException if input is invalid.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isSensitive → bool
-
Whether this value is sensitive (for example, a password).
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → String
-
The validated underlying value.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
tryParse(
String input, [PhoneValidationConfig config = const PhoneValidationConfig()]) → Either< PhoneError, PhoneValue> -
Attempts to parse
inputinto a PhoneValue. ReturnsEither<PhoneError, PhoneValue>.