Skip to main content

Whitelabel PnP Flutter SDK

Web3Auth is fully whitelabelable with application branding to have a consistent user experience. For Whitelabeling, there are two different aspects available for you. Web3Auth gives you the ability to define a custom UI, branding, and translations for your applications. All our SDKs support Whitelabeling, giving granular customization capability across all our offerings.

note

This is a paid feature and the minimum pricing plan to use this SDK in a production environment is the Growth Plan. You can use this feature in Web3Auth Sapphire Devnet network for free.

Within the Web3Auth Plug and Play Flutter SDK, whitelabeling can happen in two different places:

NEW: Whitelabeling via the Dashboard

From version 5.0.0, Web3Auth Flutter Plug and Play SDK offers whitelabeling capabilities via the Dashboard. This enables developers to customize the authentication flow, user interface, and translations to align with their application's branding and user experience requirements.

  • Customize the Authentication screens: Modify the appearance of the authentication screens, including the primary color, application name, logo and dark or light mode, to align with your application's branding.
  • Configure Language and Translations: Customize the language and translations within the authentication flow to cater to your target audience.

Web3Auth Whitelabeling Dashboard

Whitelabeling while Web3Auth Instantiating

For defining custom UI, branding, and translations for your brand app, you just need to define an optional object called WhiteLabelData. WhiteLabelData can be definied during initialization of the SDK in Web3AuthOptions object.

note

This is a paid feature and the minimum pricing plan to use this SDK in a production environment is the Growth Plan. You can use this feature in Web3Auth Sapphire Devnet network for free.

Arguments

WhiteLabelData

ParameterDescription
appName?Display name for the app in the UI.
logoLight?App logo to be used in dark mode. It accepts url in String as a value.
logoDark?App logo to be used in light mode. It accepts url in String as a value.
defaultLanguage?Language which will be used by Web3Auth, app will use browser language if not specified. Default language is Language.en. Checkout Language for supported languages.
mode?Theme mode for the login modal. Choose between ThemeModes.auto, ThemeModes.light or ThemeModes.dark background modes. Default value is ThemeModes.auto.
theme?Used to customize the theme of the login modal. It accepts HashMap as a value.
appUrl?Url to be used in the Modal. It accepts url in String as a value.
useLogoLoader?Use logo loader. If logoDark and logoLight are null, the default Web3Auth logo will be used for the loader. Default value is false.

name

The name of the application. This will be displayed in the key reconstruction page.

Standard screen without any change

Standard screen without any change

Name changed to Formidable Duo

Name changed to Formidable Duo

logoLight & logoDark

The logo of the application. Displayed in dark and light mode respectively. This will be displayed in the key reconstruction page.

logoLight on dark mode

logoLight on dark mode

logoDark on light mode

logoDark on light mode

defaultLanguage

Default language will set the language used on all OpenLogin screens. The supported languages are:

  • en - English (default)

  • de - German

  • ja - Japanese

  • ko - Korean

  • zh - Mandarin

  • es - Spanish

  • fr - French

  • pt - Portuguese

  • nl - Dutch

  • tr - Turkish

default Language screen

dark

Can be set to true or false with default set to false.


For Light: dark: false

light theme

For Dark: dark: true

dark theme

theme

Theme is a record of colors that can be configured. As of, now only primary color can be set and has effect on OpenLogin screens (default primary color is #0364FF). Theme affects icons and links. Examples below.

Standard color #0364FF

Theme is a record of colors that can be configured.

Color changed to #D72F7A

Theme affects icons and links.

Example

Usage
Future<void> initWeb3Auth() async {

final themeMap = HashMap<String, String>();
themeMap['primary'] = "#229954";

Uri redirectUrl;
if (Platform.isAndroid) {
redirectUrl = Uri.parse('{SCHEME}://{HOST}/auth');
// w3a://com.example.w3aflutter/auth
} else if (Platform.isIOS) {
redirectUrl = Uri.parse('{bundleId}://auth');
// com.example.w3aflutter://openlogin
} else {
throw UnKnownException('Unknown platform');
}

await Web3AuthFlutter.init(
Web3AuthOptions(
clientId: "WEB3AUTH_CLIENT_ID",
network: Network.sapphire_mainnet,
redirectUrl: redirectUrl,
whiteLabel: WhiteLabelData(
appName: "Web3Auth Flutter App",
logoLight:
"https://www.vectorlogo.zone/logos/flutterio/flutterio-icon.svg",
logoDark:
"https://cdn.icon-icons.com/icons2/2389/PNG/512/flutter_logo_icon_145273.png",
defaultLanguage: Language.en,
mode: ThemeModes.auto,
appUrl: "https://web3auth.io",
useLogoLoader: true,
theme: themeMap,
),
),
);
}