-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Edit Flutter EW builder. #2371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
bgravenorst
wants to merge
5
commits into
main
Choose a base branch
from
edit-ew-builder-flutter
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Edit Flutter EW builder. #2371
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
4e360de
Edit Flutter EW builder.
bgravenorst 80fd161
Apply suggestions from code review
bgravenorst 67b8d66
Convert to lowercase.
bgravenorst db006b6
Merge branch 'main' into edit-ew-builder-flutter
bgravenorst 4f1ac64
Merge branch 'main' into edit-ew-builder-flutter
bgravenorst File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
13 changes: 9 additions & 4 deletions
13
...ges/quickstart/builder/embedded-wallets/flutter/stepContent/blockchainCalls.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. | ||
|
||
::: |
15 changes: 7 additions & 8 deletions
15
...s/quickstart/builder/embedded-wallets/flutter/stepContent/flutterQuickStart.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
``` | ||
bgravenorst marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
::: | ||
If you need help, visit the [Web3Auth community](https://web3auth.io/community/c/help-pnp/pnp-flutter/18). |
11 changes: 6 additions & 5 deletions
11
src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/initialize.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. | ||
bgravenorst marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
:::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). | ||
|
||
::: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 6 additions & 9 deletions
15
src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/login.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
11 changes: 3 additions & 8 deletions
11
src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/logout.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
9 changes: 4 additions & 5 deletions
9
...quickstart/builder/embedded-wallets/flutter/stepContent/requirementsAndroid.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
bgravenorst marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
::: | ||
Refer to the `android/app/build.gradle` file in your Flutter project to update the versions. |
13 changes: 6 additions & 7 deletions
13
...ges/quickstart/builder/embedded-wallets/flutter/stepContent/requirementsIOS.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
13 changes: 7 additions & 6 deletions
13
src/pages/quickstart/builder/embedded-wallets/flutter/stepContent/whitelist.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: | ||
|
||
- `<bundleId>://auth` for iOS. | ||
- `{SCHEME}://{YOUR_APP_PACKAGE_NAME}` for Android. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.