Skip to main content

Flutter SDK v4 Installation Guide

WOVN Flutter SDK v4 aligns with the iOS/Android v4 architecture so teams can reuse the same workflows. Follow these steps to install the SDK, hook it into your Flutter entry point, and validate that translations flow correctly.

Download and Install the SDK

  1. Download the SDK file from the link provided by our CS team.
  2. Unzip the SDK to a convenient location (for example, your Downloads folder).

From the extracted wovnflutter/ folder, run the installer script and follow the prompts. The script asks for your Flutter project and copies the SDK into the project root automatically, so you do not need to move the folder yourself:

cd wovnflutter
./scripts/install.sh

The script installs the SDK and guides you through the required configuration questions.

Manual Setup

If you prefer not to use the script, copy the extracted wovnflutter/ folder into your project root before continuing.

Update pubspec.yaml

dependencies:
wovn_flutter:
path: ./wovnflutter

Update lib/main.dart

Replace your original runApp call with the v4 initialization flow so Flutter mirrors the native SDK lifecycle:

lib/main.dart
import 'package:flutter/material.dart';
import 'package:wovn_flutter/wovn_flutter.dart';

typedef Text = WovnText;
typedef RichText = WovnRichText;

Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();

await Wovn.initialize(
token: 'YOUR_TOKEN',
config: const LocalSettings(
logLevel: 0, // 0 = trace, 2 = warn
translationPreviewMode: false,
),
);
Wovn().changeToSystemLang();

runApp(Wovn.wrapApp(const MyApp()));
}

Import Wovn Widgets

In each file where you want translated text, import the WOVN package and alias Text and RichText to their WOVN counterparts:

import 'package:wovn_flutter/wovn_flutter.dart';

typedef Text = WovnText;
typedef RichText = WovnRichText;

This ensures that all standard text widgets are replaced with WOVN-enabled versions that respond to language changes.

Excluding Sensitive Text

To prevent specific text from being translated (e.g., passwords, API keys, brand names), use isIgnored: true on any text widget or add "WovnIgnore" to the widget's key. See Ignoring Translations for details.

Verify the Setup

  1. Run flutter pub get to confirm the new local dependency resolves cleanly.
  2. Launch the app with flutter run (simulator or device). Successful initialization prints logs such as Wovn: initialize: completed successfully when translations and settings download.
  3. Register the device’s Client ID for Development Mode by following Enable Development Mode. Filter the logs for Client ID, copy the value, and add it under Settings → App → Security in the dashboard so preview and reporting features can target this device.
  4. Call the language helpers to confirm runtime switching:
    Wovn().changeLangUsingLocaleString('en');
    Wovn().changeToSystemLang();
    Widgets wrapped in WovnListenableBuilder or text passed through Wovn().translate should update immediately.
  5. If you hit duplicate Text/RichText definitions, add hide Text, RichText to the offending export statements, run flutter clean, and rebuild.