Create a client
String
required
Base URL of the Era service.
String
required
Publishable key for mobile identity and verification requests.
http.Client
Custom HTTP client. The SDK creates one when omitted.
bool
default:"false"
Close the supplied
httpClient when close() is called.EraFlutterStorage
Custom visitor storage. The default uses
SharedPreferencesAsync.init([visitorId])
Loads the stored visitor or creates one.
getVisitorId()
Reads the current visitor without creating one.
null when none exists.
getVerification()
Checks whether the current visitor is linked to an Era end user.
eraEndUserId is an opaque Era ID or null.
startVerification(type, identifier)
Sends an email or phone verification code.
confirmVerification(challengeId, code)
Confirms a code and links the current visitor.
resendVerification(challengeId)
Sends another code.
resetVisitor()
Replaces the current visitor and returns the new ID.
close()
Aborts this client’s requests and closes its owned HTTP client.
close() more than once has no effect. Other methods throw
client_closed after the client is closed.
See Flutter SDK errors.