PhoneLookupResult class abstract

Result of POST /auth/verify-otp. Branches based on whether the user already has an account.

Available extensions
Annotations
  • @freezed

Constructors

PhoneLookupResult({required bool verified, required bool hasAccount, String? phoneGrantToken, String? phoneNumber})
const
factory
PhoneLookupResult.fromJson(Map<String, dynamic> json)
factory

Properties

copyWith → $PhoneLookupResultCopyWith<PhoneLookupResult>
Create a copy of PhoneLookupResult with the given fields replaced by the non-null parameter values.
no setterinherited
hasAccount bool
Whether the user has an account.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
phoneGrantToken String?
Present when hasAccount is true. Use to call POST /auth/login or POST /auth/register with the token.
no setterinherited
phoneNumber String?
The phone number that was verified.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
verified bool
Whether the OTP was verified.
no setterinherited

Methods

map<TResult extends Object?>(TResult $default(_PhoneLookupResult value)) → TResult

Available on PhoneLookupResult, provided by the PhoneLookupResultPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_PhoneLookupResult value)?) → TResult?

Available on PhoneLookupResult, provided by the PhoneLookupResultPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_PhoneLookupResult value)?, {required TResult orElse()}) → TResult

Available on PhoneLookupResult, provided by the PhoneLookupResultPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(bool verified, bool hasAccount, String? phoneGrantToken, String? phoneNumber)?, {required TResult orElse()}) → TResult

Available on PhoneLookupResult, provided by the PhoneLookupResultPatterns extension

A variant of when that fallback to an orElse callback.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this PhoneLookupResult to a JSON map.
inherited
toString() String
A string representation of this object.
inherited
when<TResult extends Object?>(TResult $default(bool verified, bool hasAccount, String? phoneGrantToken, String? phoneNumber)) → TResult

Available on PhoneLookupResult, provided by the PhoneLookupResultPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(bool verified, bool hasAccount, String? phoneGrantToken, String? phoneNumber)?) → TResult?

Available on PhoneLookupResult, provided by the PhoneLookupResultPatterns extension

A variant of when that fallback to returning null

Operators

operator ==(Object other) bool
The equality operator.
inherited