Skip to content

Commit aea66d7

Browse files
Edit Flutter EW builder. (#2371)
* Edit Flutter EW builder. Signed-off-by: bgravenorst <byron.gravenorst@consensys.net> * Apply suggestions from code review Co-authored-by: Alexandra Carrillo <12214231+alexandratran@users.noreply.github.com> * Convert to lowercase. Signed-off-by: bgravenorst <byron.gravenorst@consensys.net> --------- Signed-off-by: bgravenorst <byron.gravenorst@consensys.net> Co-authored-by: Alexandra Carrillo <12214231+alexandratran@users.noreply.github.com>
1 parent 5d10993 commit aea66d7

File tree

9 files changed

+61
-62
lines changed

9 files changed

+61
-62
lines changed
Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1-
### Making Blockchain Calls
1+
### Make blockchain calls
22

3-
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.
3+
After the user signs in, the SDK provides a user-scoped private key.
44

5-
:::info Connect any Blockchain
5+
Use the private key to interact with chains such as [Ethereum](https://ethereum.org/) to make
6+
blockchain calls, like fetching a user's account balance, signing or sending
7+
transactions, and reading or writing to smart contracts.
68

7-
Refer to the [Blockchain Documentation](/connect-blockchain/) to know more about how to make calls on any blockchain.
9+
:::info Connect any blockchain
10+
11+
Refer to the [blockchain documentation](/embedded-wallets/connect-blockchain/) to learn more about
12+
making calls on any supported blockchain.
813

914
:::
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
### MetaMask Embedded Wallets Flutter Quick Start
1+
### MetaMask Embedded Wallets Flutter quickstart
22

3-
This guide is designed to help you quickly integrate a basic instance of MetaMask Embedded Wallet SDKs in your Flutter app.
3+
This guide is designed to help you quickly integrate a basic instance of MetaMask Embedded wallets
4+
(Web3Auth) SDKs in your Flutter app.
45

5-
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).
6+
Build the project locally:
67

7-
:::tip building locally
8+
1. Clone the MetaMask Embedded Wallets Flutter quickstart application:
89

9-
- Clone the MetaMask Embedded Wallets Flutter Quick Start Application
10+
```shell npm2yarn
11+
npx degit Web3Auth/web3auth-flutter-examples/flutter-quick-start flutter-quick-start
12+
```
1013

11-
```shell npm2yarn
12-
npx degit Web3Auth/web3auth-flutter-examples/flutter-quick-start flutter-quick-start
13-
```
14+
1. Change to the quickstart directory:
1415

15-
- Install & Run
16+
```shell npm2yarn
17+
cd flutter-quick-start
18+
```
1619

17-
```shell npm2yarn
18-
cd flutter-quick-start
19-
### run project in Android Studio or in VSCode
20-
```
20+
1. Run the project in [Android Studio](https://developer.android.com/studio) or [VS Code](https://code.visualstudio.com/).
2121

22-
:::
22+
If you need help, visit the [Web3Auth community](https://web3auth.io/community/c/help-pnp/pnp-flutter/18).
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
### Create and initialize the Web3Auth instance
1+
### Initialize the `Web3Auth` instance
22

3-
Let's now create an instance of the `Web3AuthFlutter`.
3+
You'll need a `clientId` and `network` to initialize the `Web3AuthFlutter` class.
44

5-
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.
5+
You can get your `clientId` from the previous step, whereas `network` signifies the type of
6+
network(`sapphire_mainnet` or `sapphire_devnet`) you want to initialize `Web3Auth` with.
67

7-
:::info sdk reference
8+
:::info SDK reference
89

9-
Read more about [Flutter SDK](/embedded-wallets/sdk/flutter).
10+
Read more about the [Flutter SDK](/embedded-wallets/sdk/flutter).
1011

1112
:::

src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/installation.mdx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
### Install MetaMask Embedded Wallet SDK
1+
### Install MetaMask Embedded Wallets SDK
22

3-
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.
3+
Use the [Web3Auth Flutter SDK](https://github.com/Web3Auth/web3auth-flutter-sdk) to integrate MetaMask
4+
Embedded Wallets into your application.
45

56
Add `web3auth_flutter` as a dependency to your `pubspec.yaml` file.
67

@@ -15,8 +16,9 @@ dependencies:
1516
web3auth_flutter: ^3.1.1 ### or the latest version
1617
```
1718
18-
:::warning Update to the Latest-SDK
19+
:::warning Update to the latest SDK
1920
20-
Please use the **[latest version](https://github.com/Web3Auth/web3auth-flutter-sdk/releases)** of MetaMask's Web3Auth Flutter SDK.
21+
Use the latest version of the Web3Auth Flutter SDK (for MetaMask Embedded Wallets).
22+
See the [release notes](https://github.com/Web3Auth/web3auth-flutter-sdk/releases).
2123
2224
:::
Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
### Logging in your User
1+
### Sign in your user
22

3-
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.
3+
Use the `Web3Auth` instance [`login`](/embedded-wallets/sdk/flutter/usage#logging-in-a-user)
4+
function to sign in the user. You can create a button that triggers the `login` function for the
5+
sign in method of their choice.
46

5-
After a successful user login, Web3Auth will redirect back to your app, with a payload stored in the state of the Web3Auth Instance.
6-
7-
:::info SDK Reference
8-
9-
- [`login()` function](/embedded-wallets/sdk/flutter/usage#logging-in-a-user).
10-
11-
:::
7+
After a successful sign-in, the SDK stores the session state internally, and the user is redirected
8+
back to your app.
Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
### Log the user out
1+
### Sign out the user
22

3-
Use the `logout` function of the Web3Auth Instance to log the user out.
4-
5-
:::info SDK Reference
6-
7-
- [`logout()` function](/embedded-wallets/sdk/flutter/usage#logging-out-a-user).
8-
9-
:::
3+
Use the [`logout`](/embedded-wallets/sdk/flutter/usage#logging-out-a-user) function of the Web3Auth
4+
instance to sign the user out.
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
:::note Requirements Android
1+
### Android prerequisites
22

3-
- Android API version `24` or newer is required.
4-
- `compileSdk` should be `34` or newer.
5-
- Check `android/app/build.gradle` in your Flutter project to change it.
3+
- Android API version 24 or later
4+
- `compileSdk` version 34 or later
65

7-
:::
6+
Refer to the `android/app/build.gradle` file in your Flutter project to update the versions.
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
:::note Requirements iOS
1+
### iOS prerequisites
22

3-
- iOS 14+
4-
- Xcode 11.4+ / 12.x
5-
- Swift 4.x / 5.x
6-
- `platform :ios` needs to be `14.0`.
7-
- Check `ios/Podfile` in your Flutter project to change it.
3+
- iOS 14 or later
4+
- Xcode 12 or later
5+
- Swift 5 or later
6+
- `platform :ios` version 14.0
87

9-
:::
8+
Refer to the `ios/Podfile` file in your Flutter project to update the versions.
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
### Whitelist Package & Bundle ID
1+
### Whitelist your bundle ID
22

3-
To whitelist, you'll need to create a project or use an existing one in the [Developer Dashboard](https://dashboard.web3auth.io).
3+
To whitelist your app:
44

5-
- Create or Select a Web3Auth project.
5+
1. In the [Web3Auth dashboard](https://dashboard.web3auth.io), select your project.
66

7-
- To **Whitelist URLs** section:
8-
- Add `{SCHEME}://{YOUR_APP_PACKAGE_NAME}` for `Android`,
9-
- and, `{bundleId}://auth` for `iOS` to
7+
1. Select the **Domains** tab. In **Whitelist URLs**, add:
8+
9+
- `<bundleId>://auth` for iOS.
10+
- `{SCHEME}://{YOUR_APP_PACKAGE_NAME}` for Android.

0 commit comments

Comments
 (0)