CredentialManager class
A class that provides a high-level interface for interacting with the Credential Manager.
The methods are intentionally thin wrappers around CredentialManagerPlatform so that you can extend or swap pieces out when writing custom plugins. For details on extending the Dart and native layers, see the “Extensions” section in the docs: https://djsmk123.github.io/flutter_credential_manager_compose/#/
Constructors
- CredentialManager()
- Creates a CredentialManager and ensures the appropriate platform implementation is registered. If you ship a forked Android/iOS package, update the imports above or register your plugin before instantiating this class (see docs linked in the class comment).
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isGmsAvailable → bool
-
Checks if Google Play Services is available on the device.
no setter
- isSupportedPlatform → bool
-
Checks if the Credential Manager is supported on the current platform.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getCredentials(
{CredentialLoginOptions? passKeyOption, FetchOptionsAndroid? fetchOptions}) → Future< Credentials> - Gets credentials.
-
getPlatformVersion(
) → Future< String?> - Gets the platform version.
-
init(
{required bool preferImmediatelyAvailableCredentials, String? googleClientId}) → Future< void> - Initializes the Credential Manager.
-
logout(
) → Future< void> - Logs out the user.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
prepareCredentials(
{CredentialLoginOptions? passKeyOption, FetchOptionsAndroid? fetchOptions}) → Future< bool> - Prepares a later credential request on platforms that support prefetching.
-
saveGoogleCredential(
{bool useButtonFlow = false, String? nonce}) → Future< GoogleIdTokenCredential?> - Saves Google credentials.
-
savePasskeyCredentials(
{required CredentialCreationOptions request}) → Future< PublicKeyCredential> - Saves credentials using passkey.
-
savePasswordCredentials(
PasswordCredential credential) → Future< void> - Saves plain text password credentials.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited