> For the complete documentation index, see [llms.txt](/llms.txt).

# Using Flutter SDK

Embedded Wallets provides a comprehensive set of functions to handle authentication, user management, and blockchain interactions in your Flutter applications. These functions allow you to implement features like user sign-in, Multi-Factor Authentication (MFA), private key retrieval, and Wallet Services with minimal effort. Each function is designed to handle a specific aspect of Embedded Wallets' functionality, making it easy to integrate into your Flutter projects.

## List of functions

tip

For detailed usage, configuration options, and code examples, refer to the dedicated documentation page for each function.

note

The code samples use `log` from `dart:developer` and `PlatformException` from `package:flutter/services.dart`. Add these imports to your file:

```dart
import 'dart:developer';

import 'package:flutter/services.dart';

```

### Authentication functions

| Function Name                                                  | Description                                          |
| -------------------------------------------------------------- | ---------------------------------------------------- |
| [connectTo()](/embedded-wallets/sdk/flutter/usage/connect-to/) | Signs the user in with the selected auth connection. |
| [logout()](/embedded-wallets/sdk/flutter/usage/logout/)        | Signs the user out from the current session.         |

### Session functions

| Function Name                                                                       | Description                                                      |
| ----------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
| [getAccessToken()](/embedded-wallets/sdk/flutter/usage/get-access-token/)           | Retrieves the access token for the current auth session.         |
| [getIdentityToken()](/embedded-wallets/sdk/flutter/usage/get-identity-token/)       | Retrieves the identity token (ID token) for the current session. |
| [refreshSession()](/embedded-wallets/sdk/flutter/usage/refresh-session/)            | Refreshes the current session and returns the updated response.  |
| [getWeb3AuthResponse()](/embedded-wallets/sdk/flutter/usage/get-web3auth-response/) | Retrieves the `Web3AuthResponse` for the current session.        |

### User management functions

| Function Name                                                                                                  | Description                                                        |
| -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
| [getUserInfo()](/embedded-wallets/sdk/flutter/usage/get-user-info/)                                            | Retrieves the authenticated user's information.                    |
| [getUserInfoAsync()](/embedded-wallets/sdk/flutter/usage/get-user-info/#fetch-user-information-asynchronously) | Fetches the user's information asynchronously from the native SDK. |

### Private key functions

| Function Name                                                                          | Description                                                                     |
| -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| [getPrivateKey()](/embedded-wallets/sdk/flutter/usage/get-private-key/)                | Retrieve the user's secp256k1 private key for EVM-compatible chains.            |
| [getEd25519PrivateKey()](/embedded-wallets/sdk/flutter/usage/get-ed25519-private-key/) | Retrieve the user's ed25519 private key for chains like Solana, Near, Algorand. |

### Security functions

| Function Name                                                  | Description                                |
| -------------------------------------------------------------- | ------------------------------------------ |
| [enableMFA()](/embedded-wallets/sdk/flutter/usage/enable-mfa/) | Enables MFA for the user.                  |
| [manageMFA()](/embedded-wallets/sdk/flutter/usage/manage-mfa/) | Allows users to manage their MFA settings. |

### Wallet Services functions

| Function Name                                                         | Description                                                       |
| --------------------------------------------------------------------- | ----------------------------------------------------------------- |
| [showWalletUI()](/embedded-wallets/sdk/flutter/usage/show-wallet-ui/) | Launches the templated wallet UI in WebView.                      |
| [request()](/embedded-wallets/sdk/flutter/usage/request/)             | Opens templated transaction screens for signing EVM transactions. |
