1.Add the Wallet Service SDK to Your Flutter App

Run this command:

With Flutter:

flutter pub add particle_wallet

click here to get the demo source code

2.Configure Android project

open ${your flutter project} /example/app/build.gradle. reference click here

2.1 add project config and update the minSdkVersion to 23

//Modify these configurations
defaultConfig {
    // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
    applicationId "com.example.particle_auth_test"
    // You can update the following values to match your application needs.
    // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
    minSdkVersion flutter.minSdkVersion
    targetSdkVersion flutter.targetSdkVersion
    versionCode flutterVersionCode.toInteger()
    versionName flutterVersionName

//After modification๏ผš
defaultConfig {
   // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
   applicationId "com.example.particle_auth_test"
   // You can update the following values to match your application needs.
   // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
   minSdkVersion 23 // required by particle sdk
   targetSdkVersion 33
   versionCode flutterVersionCode.toInteger()
   versionName flutterVersionName

   //get from https://dashboard.particle.network/
   manifestPlaceholders["PN_PROJECT_ID"] = "772f7499-1d2e-40f4-8e2c-7b6dd47db9de" //your project id
   manifestPlaceholders["PN_PROJECT_CLIENT_KEY"] = "ctWeIc2UBA6sYTKJknT9cu9LBikF00fbk1vmQjsV" //your project client key
   manifestPlaceholders["PN_APP_ID"] = "01a23ce8-d2e9-4b37-9eab-bf477279e53e" //your app id

//Modify these configurations
dependencies {
//After modification๏ผš
dependencies {
    modules {
        module("org.bouncycastle:bcprov-jdk15to18") {

2.2 update Java Version to 11 and add dataBinding config

//Modify these configurations
compileOptions {
  sourceCompatibility JavaVersion.VERSION_1_8
  targetCompatibility JavaVersion.VERSION_1_8

kotlinOptions {
  jvmTarget = '1.8'

//After modification๏ผš
compileOptions {
  sourceCompatibility JavaVersion.VERSION_11
  targetCompatibility JavaVersion.VERSION_11

kotlinOptions {
  jvmTarget = JavaVersion.VERSION_11

dataBinding {
  enabled = true

Now,Android configuration is complete!

3.Configure iOS project


  • Install the following:

    • Xcode 14.1 or later.

  • Make sure that your project meets the following requirements:

    • Your project must target these platform versions or later:

      • iOS 14

3.1 After export iOS project, open Runner.xcworkspace under ios folder.

3.2 Create a ParticleNetwork-Info.plist into the root of your Xcode project, and make sure the file is check under Target Membership.

3.3 Copy the following text into this file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">

3.4 Replace YOUR_PROJECT_UUID, YOUR_PROJECT_CLIENT_KEY, and YOUR_PROJECT_APP_UUID with the new values created in your Dashboard

3.5. Import the ParticleAuthService module in your AppDelegate.swift file.

import ParticleConnect

3.6. Add the scheme URL handle in your app's application(_:open:options:) method

override func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool {
    if ParticleConnect.handleUrl(url) {
        return true
    } else {
        return super.application(app, open: url, options: options)

3.7. Configure your app scheme URL, select your app from TARGETS, under Info section, click + to add the URL types, and paste your scheme in URL Schemes

Your scheme URL should be "pn" + your project app uuid.

For example, if your project app id is "63bfa427-cf5f-4742-9ff1-e8f5a1b9828f", your scheme URL is "pn63bfa427-cf5f-4742-9ff1-e8f5a1b9828f".

3.8 In Xcode right-click your Info.plist file and choose "Open As Source Code".

Copy & Paste the XML snippet into the body of your file (<dict>...</dict>).

    <string>We need access in order to open photos of barcodes</string>
    <string>We use the camera to scan barcodes</string>

3.9 Edit Podfile, you should follow Podfile required to edit Podfile.

Initialize the SDK

Before using the SDK, you have to call init(Required)

Migrating to WalletConnect v2

Starting from version 0.14.0, WalletConnectV2 is supported.

        "your wallet connect v2 project id")

        "Particle Connect",
        "Particle Connect Flutter Demo"));
String tokenAddress = "8ci2fZwQSmArbeHkuA7M8h5rsRwwh4FMTXrZxb3KsDpb";
String toAddress = "1232fZwQSmArbeHkuA7M8h5rsRwwh4FMTXrZxb3KsDpb";
int amount = 1000000;
ParticleWallet.navigatorTokenSend(tokenAddress: tokenAddress, toAddress: toAddress, amount: amount);
String tokenAddress = "8ci2fZwQSmArbeHkuA7M8h5rsRwwh4FMTXrZxb3KsDpb";
ParticleWallet.navigatorTokenTransactionRecords(tokenAddress: tokenAddress);
String mintAddress = "0xD000F000Aa1F8accbd5815056Ea32A54777b2Fc4";
String tokenId = "1412";
ParticleWallet.navigatorNFTSend(mintAddress, tokenId, receiveAddress: "");
String mint = "0xD000F000Aa1F8accbd5815056Ea32A54777b2Fc4";
String tokenId = "1412";
ParticleWallet.navigatorNFTDetails(mint, tokenId);

Set pay disabled

bool disabled = true;

Get pay disabled

bool disabled = await ParticleWallet.getPayDisabled();

Set swap disabled

bool disabled = true;

Get swap disabled

bool disabled = await ParticleWallet.getSwapDisabled();
final config = BuyCryptoConfig(walletAddress:"your wallet address", cryptoCoin:"USDT", fiatCoin:"USD", fiatAmt:1000, network:OpenBuyNetwork.ethereum);
ParticleWallet.navigatorBuyCrypto(config: config);
try {
  Account account = await ParticleWallet.navigatorLoginList();
  showToast("navigatorLoginList: $account");
} catch (error) {
  showToast("navigatorLoginList: $error");
const url = "https://opensea.io";
ParticleWallet.navigatorDappBrowser(url: url);

Set Support chain

List<ChainInfo> chainInfos = <ChainInfo>[];

Switch wallet

WalletType walletType = WalletType.particle;
String publicAddress = "";
String result = await ParticleWallet.switchWallet(walletType, publicAddress);

Custom UI

// Set show test network
// Set show manage wallet
// Set show language setting
// Set show appearance setting
// Set support dapp browser
// Set support wallet connect in wallet page.
// Set support add token
// Set show smart account setting

// Set display token addresses
List<String> tokenAddresses = <String>[

// Set priority token addresses
List<String> tokenAddresses = <String>[


// Set display nft addresses
List<String> nftContractAddresses = <String>[

// Set priority nft addresses
List<String> nftContractAddresses = <String>[

// set custom ui color 
// your custom json string.
// example https://github.com/Particle-Network/particle-ios/blob/main/Demo/Demo/customUIConfig.json
const json = "";

Set custom Wallet name and icon

ParticleWallet.setCustomWalletName("Your Wallet Name", "your wallet icon url");

// in Android platform, call setWallet and set your wallet name.
ParticleWallet.setWallet(walletType, pubAddress!, "Your wallet name");

Set custom localizable

// you can replace localizable strings that appeared in 
// yourIOSBuild/Pods/ParticleWalletGUI/XCFrameworks/ParticleWalletGUI/ParticleWalletGUI.bundle/en.lproj/Locallizable.strings.
if (Platform.isIOS) {
  Map<String, String> enLocalizables = <String, String>{
    "network fee": "Service Fee",
    "particle auth wallet": "Your wallet name"

  Map<Language, Map<String, String>> localizables = <Language, Map<String, String>> {
    Language.en:  enLocalizables


Last updated