ValueResult<T>.failure constructor
Creates a failed result containing an error message.
error: The error message describing what went wrongtitle: Optional title for the error (e.g., for display purposes)- Returns: A ValueResult representing failure
Implementation
factory ValueResult.failure(String error, {String? title}) {
return ValueResult._(null, error, title);
}