# Whitelabel

> Web3Auth Flutter SDK - Whitelabel | Embedded Wallets

Embedded Wallets allows complete whitelabeling with application branding for a consistent user experience. You can customize three different aspects:

- **UI elements:** Customize the appearance of modals and components
- **Branding:** Apply your brand colors, logos, and themes
- **Translations:** Localize the interface for your users

:::info

All of these settings can be easily managed directly from the Embedded Wallets dashboard. Once you update your branding, or UI preferences there, the changes will automatically apply to your integration.

:::

:::note

This is a paid feature and the minimum [pricing plan](https://web3auth.io/pricing.html) to use this
SDK in a production environment is the **Growth Plan**. You can use this feature in Web3Auth
Sapphire Devnet network for free.

:::

## Customizing the Web3Auth login screens

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](https://web3auth.io/pricing.html) 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`

<Tabs
  defaultValue="table"
  values={[
    { label: "Table", value: "table" },
    { label: "Class", value: "class" },
  ]}
>

<TabItem value="table">

| Parameter          | Description                                                                                                                                                              |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `appName?`         | Display name for the app in the UI.                                                                                                                                      |
| `logoLight?`       | App logo to be used in dark mode. It accepts URL as a string.                                                                                                            |
| `logoDark?`        | App logo to be used in light mode. It accepts URL as a string.                                                                                                           |
| `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 as a string.                                                                                                                 |
| `useLogoLoader?`   | Use logo loader. If `logoDark` and `logoLight` are null, the default Web3Auth logo will be used for the loader. Default value is false.                                  |

</TabItem>
<TabItem value="class">

```dart
class WhiteLabelData {
  final String? appName;
  final String? logoLight;
  final String? logoDark;
  final Language? defaultLanguage;
  final ThemeModes? mode;
  final HashMap? theme;
  final String? appUrl;
  final bool? useLogoLoader;

  WhiteLabelData({
    this.appName,
    this.logoLight,
    this.logoDark,
    this.defaultLanguage = Language.en,
    this.mode = ThemeModes.auto,
    this.theme,
    this.appUrl,
    this.useLogoLoader,
  });

  Map<String, dynamic> toJson() {
    return {
      'appName': appName,
      'logoLight': logoLight,
      'logoDark': logoDark,
      'defaultLanguage': defaultLanguage.toString().split('.').last,
      'mode': mode.toString().split('.').last,
      'theme': theme,
      'appUrl': appUrl,
      'useLogoLoader': useLogoLoader
    };
  }
}
```

</TabItem>
</Tabs>

### `name`

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

  
    
      Standard screen without any change
    
    
  
  
    
      Name changed to <code>Formidable Duo</code>
    
    
  

### `logoLight` & `logoDark`

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

  
    
      <code>logoLight</code> on dark mode
    
    
  
  
    
      <code>logoDark</code> on light mode
    
    
  

### `defaultLanguage`

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

  
    
      
        <code>en</code> - English (default)
      
      
        <code>de</code> - German
      
      
        <code>ja</code> - Japanese
      
      
        <code>ko</code> - Korean
      
      
        <code>zh</code> - Mandarin
      
      
        <code>es</code> - Spanish
      
      
        <code>fr</code> - French
      
      
        <code>pt</code> - Portuguese
      
      
        <code>nl</code> - Dutch
      
      
        <code>tr</code> - Turkish
      
    
  
  
    
  

### `dark`

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

  
    
      For Light: <code>dark: false</code>
    
    
  
  
    
      For Dark: <code>dark: true</code>
    
    
  

### `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 <code>#0364FF</code>
    
    
  
  
    
      Color changed to <code>#D72F7A</code>
    
    
  

### Example

```dart title="Usage"
Future<void> initWeb3Auth() async {

  // focus-start
  final themeMap = HashMap<String, String>();
  themeMap['primary'] = "#229954";
  // focus-end

  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,
      // focus-start
      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,
      ),
    // focus-end
    ),
  );
}
```
