From 4e360de8fa7257d745995230b9ecb7326952c72b Mon Sep 17 00:00:00 2001 From: bgravenorst Date: Fri, 10 Oct 2025 11:23:48 +1000 Subject: [PATCH 1/3] Edit Flutter EW builder. Signed-off-by: bgravenorst --- .../flutter/stepContent/blockchainCalls.mdx | 13 +++++++++---- .../flutter/stepContent/flutterQuickStart.mdx | 15 +++++++-------- .../flutter/stepContent/initialize.mdx | 11 ++++++----- .../flutter/stepContent/installation.mdx | 10 ++++++---- .../flutter/stepContent/login.mdx | 15 ++++++--------- .../flutter/stepContent/logout.mdx | 11 +++-------- .../flutter/stepContent/requirementsAndroid.mdx | 9 ++++----- .../flutter/stepContent/requirementsIOS.mdx | 13 ++++++------- .../flutter/stepContent/whitelist.mdx | 13 +++++++------ 9 files changed, 54 insertions(+), 56 deletions(-) diff --git a/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/blockchainCalls.mdx b/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/blockchainCalls.mdx index 0853ae17885..c0c017f6922 100644 --- a/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/blockchainCalls.mdx +++ b/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/blockchainCalls.mdx @@ -1,9 +1,14 @@ -### Making Blockchain Calls +### Make blockchain calls -While using the Web3Auth Flutter SDK, you get the private key within the user scope. This private key can interact with [Ethereum](https://ethereum.org/) to make any blockchain calls, like getting user's `account`, fetch `balance`, `sign transaction`, `send transaction`, `read` from and `write` to the smart contract, etc. +After the user signs in, the SDK provides a user-scoped private key. -:::info Connect any Blockchain +Use the private key to interact with chains such as [Ethereum](https://ethereum.org/) to make +blockchain calls, like fetching a user's account balance, signing or sending +transactions, and reading or writing to smart contracts. -Refer to the [Blockchain Documentation](/connect-blockchain/) to know more about how to make calls on any blockchain. +:::info Connect any blockchain + +Refer to the [blockchain documentation](/embedded-wallets/connect-blockchain/) to learn more about +making calls on any supported blockchain. ::: diff --git a/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/flutterQuickStart.mdx b/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/flutterQuickStart.mdx index 44496fd4d16..fd8e1213513 100644 --- a/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/flutterQuickStart.mdx +++ b/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/flutterQuickStart.mdx @@ -1,22 +1,21 @@ -### MetaMask Embedded Wallets Flutter Quick Start +### MetaMask Embedded Wallets Flutter quickstart -This guide is designed to help you quickly integrate a basic instance of MetaMask Embedded Wallet SDKs in your Flutter app. +This guide is designed to help you quickly integrate a basic instance of MetaMask Embedded wallets +(Web3Auth) SDKs in your Flutter app. -If you face any problem anytime, you can always find help in the [Web3Auth Community](https://web3auth.io/community/c/help-pnp/pnp-flutter/18). +Build the project locally: -:::tip building locally - -- Clone the MetaMask Embedded Wallets Flutter Quick Start Application +1. Clone the MetaMask Embedded Wallets Flutter quickstart application: ```shell npm2yarn npx degit Web3Auth/web3auth-flutter-examples/flutter-quick-start flutter-quick-start ``` -- Install & Run +1. Change to the quickstart directory, then install and run the application: ```shell npm2yarn cd flutter-quick-start ### run project in Android Studio or in VSCode ``` -::: +If you need help, visit the [Web3Auth community](https://web3auth.io/community/c/help-pnp/pnp-flutter/18). \ No newline at end of file diff --git a/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/initialize.mdx b/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/initialize.mdx index 196030b5a26..aea02538d8f 100644 --- a/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/initialize.mdx +++ b/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/initialize.mdx @@ -1,11 +1,12 @@ -### Create and initialize the Web3Auth instance +### Initialize the `Web3Auth` instance -Let's now create an instance of the `Web3AuthFlutter`. +You'll need a `clientId` and `network` to initialize the `Web3AuthFlutter` class. -We need `clientId` and `network` to initialize Web3AuthFlutter class. You can get your `clientId` from registering (above), whereas `network` signifies the type of network(`sapphire_mainnet` or `sapphire_devnet`) you want to initialize web3auth with. +You can get your `clientId` from the previous step, whereas `network` signifies the type of +network(`SAPPHIRE_MAINNET` or `SAPPHIRE_DEVNET`) you want to initialize `Web3Auth` with. -:::info sdk reference +:::info SDK reference -Read more about [Flutter SDK](/embedded-wallets/sdk/flutter). +Read more about the [Flutter SDK](/embedded-wallets/sdk/flutter). ::: diff --git a/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/installation.mdx b/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/installation.mdx index a4cc9e72a2f..77c8e52597c 100644 --- a/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/installation.mdx +++ b/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/installation.mdx @@ -1,6 +1,7 @@ -### Install MetaMask Embedded Wallet SDK +### Install the MetaMask Embedded Wallets SDK -For making hybrid iOS & Android applications using Flutter, we have the [web3auth-flutter-sdk](https://github.com/Web3Auth/web3auth-flutter-sdk) to integrate MetaMask Embedded Wallets into your application. +Use the [Web3Auth Flutter SDK](https://github.com/Web3Auth/web3auth-flutter-sdk) to integrate MetaMask +Embedded Wallets into your application. Add `web3auth_flutter` as a dependency to your `pubspec.yaml` file. @@ -15,8 +16,9 @@ dependencies: web3auth_flutter: ^3.1.1 ### or the latest version ``` -:::warning Update to the Latest-SDK +:::warning Update to the latest SDK -Please use the **[latest version](https://github.com/Web3Auth/web3auth-flutter-sdk/releases)** of MetaMask's Web3Auth Flutter SDK. +Use the latest version of the Web3Auth Flutter SDK (for MetaMask Embedded Wallets). +See the [release notes](https://github.com/Web3Auth/web3auth-flutter-sdk/releases). ::: diff --git a/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/login.mdx b/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/login.mdx index d86e01173c2..dc5ac513c1a 100644 --- a/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/login.mdx +++ b/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/login.mdx @@ -1,11 +1,8 @@ -### Logging in your User +### Sign in your user -Use the `login` function in the Web3Auth Instance to log in user. Just create a button that triggers the `login` for the user of the login method of their choice. +Use the `Web3Auth` instance [`login`](/embedded-wallets/sdk/flutter/usage#logging-in-a-user) +function to sign in the user. You can create a button that triggers the `login` function for the +sign in method of their choice. -After a successful user login, Web3Auth will redirect back to your app, with a payload stored in the state of the Web3Auth Instance. - -:::info SDK Reference - -- [`login()` function](/embedded-wallets/sdk/flutter/usage#logging-in-a-user). - -::: +After a successful sign-in, the SDK stores the session state internally, and the user is redirected +back to your app. diff --git a/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/logout.mdx b/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/logout.mdx index 2eec475352f..43651e0fbb5 100644 --- a/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/logout.mdx +++ b/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/logout.mdx @@ -1,9 +1,4 @@ -### Log the user out +### Sign out the user -Use the `logout` function of the Web3Auth Instance to log the user out. - -:::info SDK Reference - -- [`logout()` function](/embedded-wallets/sdk/flutter/usage#logging-out-a-user). - -::: +Use the [`logout`](/embedded-wallets/sdk/flutter/usage#logging-out-a-user) function of the Web3Auth +instance to sign the user out. diff --git a/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/requirementsAndroid.mdx b/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/requirementsAndroid.mdx index 51b99f5ca98..c96d5fd1254 100644 --- a/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/requirementsAndroid.mdx +++ b/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/requirementsAndroid.mdx @@ -1,7 +1,6 @@ -:::note Requirements Android +### Android prerequisites -- Android API version `24` or newer is required. -- `compileSdk` should be `34` or newer. -- Check `android/app/build.gradle` in your Flutter project to change it. +- Android API version `24` or later +- `compileSdk` version `34` or later -::: +Refer to the `android/app/build.gradle` file in your Flutter project to update the versions. diff --git a/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/requirementsIOS.mdx b/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/requirementsIOS.mdx index 6d16aecb344..72b6c55c618 100644 --- a/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/requirementsIOS.mdx +++ b/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/requirementsIOS.mdx @@ -1,9 +1,8 @@ -:::note Requirements iOS +### iOS prerequisites -- iOS 14+ -- Xcode 11.4+ / 12.x -- Swift 4.x / 5.x -- `platform :ios` needs to be `14.0`. -- Check `ios/Podfile` in your Flutter project to change it. +- iOS 14 or later +- Xcode 12 or later +- Swift 5 or later +- `platform :ios` version 14.0 -::: +Refer to the `ios/Podfile` file in your Flutter project to update the versions. diff --git a/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/whitelist.mdx b/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/whitelist.mdx index 7e094df91d0..a3af7da6b6a 100644 --- a/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/whitelist.mdx +++ b/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/whitelist.mdx @@ -1,9 +1,10 @@ -### Whitelist Package & Bundle ID +### Whitelist your bundle ID -To whitelist, you'll need to create a project or use an existing one in the [Developer Dashboard](https://dashboard.web3auth.io). +To whitelist your app: -- Create or Select a Web3Auth project. +1. In the [Web3Auth dashboard](https://dashboard.web3auth.io), select your project. -- To **Whitelist URLs** section: - - Add `{SCHEME}://{YOUR_APP_PACKAGE_NAME}` for `Android`, - - and, `{bundleId}://auth` for `iOS` to +1. Select the **Domains** tab. In **Whitelist URLs**, add: + + - `://auth` for iOS. + - `{SCHEME}://{YOUR_APP_PACKAGE_NAME}` for Android. \ No newline at end of file From 80fd161a49800bab40184037c9fc0b436c29ed06 Mon Sep 17 00:00:00 2001 From: Byron Gravenorst <50852695+bgravenorst@users.noreply.github.com> Date: Mon, 13 Oct 2025 06:49:14 +1000 Subject: [PATCH 2/3] Apply suggestions from code review Co-authored-by: Alexandra Carrillo <12214231+alexandratran@users.noreply.github.com> --- .../flutter/stepContent/flutterQuickStart.mdx | 17 +++++++++-------- .../flutter/stepContent/installation.mdx | 2 +- .../flutter/stepContent/requirementsAndroid.mdx | 4 ++-- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/flutterQuickStart.mdx b/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/flutterQuickStart.mdx index fd8e1213513..d5330a44688 100644 --- a/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/flutterQuickStart.mdx +++ b/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/flutterQuickStart.mdx @@ -7,15 +7,16 @@ Build the project locally: 1. Clone the MetaMask Embedded Wallets Flutter quickstart application: - ```shell npm2yarn - npx degit Web3Auth/web3auth-flutter-examples/flutter-quick-start flutter-quick-start - ``` + ```shell npm2yarn + npx degit Web3Auth/web3auth-flutter-examples/flutter-quick-start flutter-quick-start + ``` -1. Change to the quickstart directory, then install and run the application: +1. Change to the quickstart directory: - ```shell npm2yarn - cd flutter-quick-start - ### run project in Android Studio or in VSCode - ``` + ```shell npm2yarn + cd flutter-quick-start + ``` + +1. Run the project in [Android Studio](https://developer.android.com/studio) or [VS Code](https://code.visualstudio.com/). If you need help, visit the [Web3Auth community](https://web3auth.io/community/c/help-pnp/pnp-flutter/18). \ No newline at end of file diff --git a/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/installation.mdx b/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/installation.mdx index 77c8e52597c..896a1c7d784 100644 --- a/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/installation.mdx +++ b/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/installation.mdx @@ -1,4 +1,4 @@ -### Install the MetaMask Embedded Wallets SDK +### Install MetaMask Embedded Wallets SDK Use the [Web3Auth Flutter SDK](https://github.com/Web3Auth/web3auth-flutter-sdk) to integrate MetaMask Embedded Wallets into your application. diff --git a/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/requirementsAndroid.mdx b/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/requirementsAndroid.mdx index c96d5fd1254..0f4c3ae889c 100644 --- a/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/requirementsAndroid.mdx +++ b/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/requirementsAndroid.mdx @@ -1,6 +1,6 @@ ### Android prerequisites -- Android API version `24` or later -- `compileSdk` version `34` or later +- Android API version 24 or later +- `compileSdk` version 34 or later Refer to the `android/app/build.gradle` file in your Flutter project to update the versions. From 67b8d66e604b3bacb2903462c4eea42715d2eff7 Mon Sep 17 00:00:00 2001 From: bgravenorst Date: Mon, 13 Oct 2025 07:08:08 +1000 Subject: [PATCH 3/3] Convert to lowercase. Signed-off-by: bgravenorst --- .../builder/embedded-wallets/flutter/stepContent/initialize.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/initialize.mdx b/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/initialize.mdx index aea02538d8f..81f2284f18c 100644 --- a/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/initialize.mdx +++ b/src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/initialize.mdx @@ -3,7 +3,7 @@ You'll need a `clientId` and `network` to initialize the `Web3AuthFlutter` class. You can get your `clientId` from the previous step, whereas `network` signifies the type of -network(`SAPPHIRE_MAINNET` or `SAPPHIRE_DEVNET`) you want to initialize `Web3Auth` with. +network(`sapphire_mainnet` or `sapphire_devnet`) you want to initialize `Web3Auth` with. :::info SDK reference