GoogleSignInPlatform class abstract
The interface that implementations of google_sign_in must implement.
Platform implementations that live in a separate package should extend this
class rather than implement it as google_sign_in
does not consider newly
added methods to be breaking changes. Extending this class (using extends
)
ensures that the subclass will get the default implementation, while
platform implementations that implements
this interface will be broken by
newly added GoogleSignInPlatform methods.
- Inheritance
-
- Object
- PlatformInterface
- GoogleSignInPlatform
- Implementers
Constructors
- GoogleSignInPlatform()
- Constructs a GoogleSignInPlatform.
Properties
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- isMock → bool
-
Only mock implementations should set this to
true
.read-only - runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
-
userDataEvents
→ Stream<
GoogleSignInUserData?>? -
Returns a stream of
GoogleSignInUserData
authentication events.read-only
Methods
-
canAccessScopes(
List< String> scopes, {String? accessToken}) → Future< bool> -
Checks if the current user has granted access to all the specified
scopes
. -
clearAuthCache(
{required String token}) → Future< void> - Clears any cached information that the plugin may be holding on to.
-
disconnect(
) → Future< void> - Revokes all of the scopes that the user granted.
-
getTokens(
{required String email, bool? shouldRecoverAuth}) → Future< GoogleSignInTokenData> - Returns the Tokens used to authenticate other API calls.
-
init(
{List< String> scopes = const <String>[], SignInOption signInOption = SignInOption.standard, String? hostedDomain, String? clientId}) → Future< void> - Initializes the plugin. Deprecated: call initWithParams instead.
-
initWithParams(
SignInInitParameters params) → Future< void> -
Initializes the plugin with specified
params
. You must call this method before calling other methods. -
isSignedIn(
) → Future< bool> - Returns whether the current user is currently signed in.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
requestScopes(
List< String> scopes) → Future< bool> -
Requests the user grants additional Oauth
scopes
. -
signIn(
) → Future< GoogleSignInUserData?> - Signs in the user with the options specified to init.
-
signInSilently(
) → Future< GoogleSignInUserData?> - Attempts to reuse pre-existing credentials to sign in again, without user interaction.
-
signOut(
) → Future< void> - Signs out the current account from the application.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance ↔ GoogleSignInPlatform
-
The default instance of GoogleSignInPlatform to use.
read / write