Skip to content
localisyncDocs
Open panel

Flutter quick start

Use Flutter 3.44 or later and Dart 3.12 or later. The SDK reads translations from memory; bundled text is available before storage or network initialization completes.

The single runtime package localisync_sdk 0.1.0 is published under wetus.co. Install it with flutter pub add localisync_sdk. Source and examples are in the Flutter repository. No management session is used by the running application.

An Owner or Admin creates a distribution and channel-scoped read key. Editors can prepare releases; an Owner or Admin publishes to Preview or Production. Wait for both delivery nodes to acknowledge the publication and read-key policy. Any current project member can read Distributions → SDK setup · Flutter. See publishing.

Copy the public configuration, add appVersion (strict SemVer) and readKey, and select preview or production. The read key grants download access only. Never embed a signing private key, control token or management credential. For Web, configure the exact application origin in the distribution before downloading.

  1. From the public SDK checkout root (or sdks/flutter in the product monorepo), run flutter pub get.
  2. Open examples/basic. Its lib/l10n/*.arb files are the application-owned baseline.
  3. Run dart run localisync_generator:generate localisync.yaml.
  4. Save your completed configuration in an ignored local file. A Flutter define file is a JSON object whose LOCALISYNC_CONFIG value is the serialized configuration string.
  5. Run flutter run --dart-define-from-file=/absolute/path/to/defines.json.

The example displays bundled text immediately, then verified cache and delivery content. Check for updates explicitly runs another bounded refresh. A failed update leaves usable text in place. Your draft and the pushed route are retained across activation.

Use HTTPS for release builds. Explicit development HTTP accepts loopback and Android emulator host addresses only. On Android emulators, replace host loopback with 10.0.2.2; this changes the cache environment scope. See platform setup.

Add localisync_sdk: ^0.1.0 to dependencies, or run flutter pub add localisync_sdk. The optional generator is a development dependency pinned to the v0.1.0 Git tag; see generator installation. No core package or dependency override is required. Repository examples resolve the SDK and generator through their Dart workspace.

Generate createLocalisyncBundle(), localisyncContracts() and LocalisyncMessages from an explicit ARB locale/fallback configuration. Construct LocalisyncConfig using your public setup, read key, application version, locale, bundle and generated contracts:

final client = createLocalisyncClient(config);
runApp(LocalisyncScope(client: client, child: const App()));

Do not await client.ready before runApp. Translation consumers can use context.translate('welcome') or LocalisyncMessages(LocalisyncScope.of(context)). Keep one client per intended delivery scope and dispose it when its owner is destroyed. There is no global singleton or change to Intl.defaultLocale.

For an existing generated AppLocalizations, use the delegate adapter.

Publish a changed translation to Preview and restart the application, or select Check for updates. Confirm resolve() reports ContentSource.remote. Disconnect delivery and restart: previous verified content should load while the baseline remains immediately available. A failed check is an error state, not a successful update. Inspect status.failure.code without logging credentials, translation text or interpolation arguments.

The ten-minute first-translation target is a usability acceptance goal. Toolchain downloads, application signing and infrastructure setup are prerequisites, not hidden SDK work.

Cookie preferences

Your choice applies to localisync.com and docs.localisync.com. You can change it at any time using Cookie settings.