IdpProvider class Null safety

Encapsulates IDP-Providers to log into firebase with.

The IdpProvider class provides various factory constructors for the supported login providers used by FirebaseAuth.signInWithIdp(). The currently supported providers are:

If you want to use a provider other then the ones specified above, you can use IdpProvider.custom() to create a custom provider instance.

Annotations

Constructors

IdpProvider.custom({required String providerId, @Default(<String, dynamic>{}) Map<String, dynamic> parameters})
Create an IDP-Instance for any provider not explicitly supported.
const
factory
IdpProvider.facebook(String accessToken)
Create an IDP-Instance for facebook.com.
const
factory
IdpProvider.google(String idToken)
Create an IDP-Instance for google.com.
const
factory
IdpProvider.twitter({required String accessToken, required String oauthTokenSecret})
Create an IDP-Instance for twitter.com.
const
factory

Properties

hashCode int
The hash code for this object.
read-onlyinherited
id String
Returns the identifier of this provider.
read-only
postBody String
Generates a HTTP-POST body to be used by the REST-API.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

map<TResult extends Object?>({required TResult google(_GoogleIdpProvider value), required TResult facebook(_FacebookIdpProvider value), required TResult twitter(_TwitterIdpProvider value), required TResult custom(_CustomIdpProvider value)}) → TResult
maybeMap<TResult extends Object?>({TResult google(_GoogleIdpProvider value)?, TResult facebook(_FacebookIdpProvider value)?, TResult twitter(_TwitterIdpProvider value)?, TResult custom(_CustomIdpProvider value)?, required TResult orElse()}) → TResult
maybeWhen<TResult extends Object?>({TResult google(String idToken)?, TResult facebook(String accessToken)?, TResult twitter(String accessToken, String oauthTokenSecret)?, TResult custom(String providerId, Map<String, dynamic> parameters)?, required TResult orElse()}) → TResult
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
when<TResult extends Object?>({required TResult google(String idToken), required TResult facebook(String accessToken), required TResult twitter(String accessToken, String oauthTokenSecret), required TResult custom(String providerId, Map<String, dynamic> parameters)}) → TResult

Operators

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