localizely_sdk 1.0.0 copy "localizely_sdk: ^1.0.0" to clipboard
localizely_sdk: ^1.0.0 copied to clipboard

outdated

Localizely SDK for Flutter enables Over-the-air translations update from Localizely cloud platform

Localizely SDK #

SDK setup #

  1. Update pubspec.yaml file:
dependencies:
  ...
  localizely_sdk: ^1.0.0

flutter_intl:
  ...
  localizely:
    ota_enabled: true # Required for Over-the-air translation updates
  1. Trigger localization files generation by Flutter Intl IDE plugin or by intl_utils library

  2. Initialize Localizely SDK (e.g. main.dart file):

import 'package:localizely_sdk/localizely_sdk.dart'; // import sdk package
void main() { 
  Localizely.init('<SDK_TOKEN>', '<DISTIRIBUTION_ID>'); // init sdk 
  Localizely.setPreRelease(true); // Add this only if you want to use prereleases
  runApp(MyApp());
}

// Update translations and setState with callback
Localizely.updateTranslations().then( 
  (response) => setState(() => print('Translations fetched')), 
  onError: (error) => print('Error occurred'));
20
likes
0
pub points
92%
popularity

Publisher

verified publisherlocalizely.com

Localizely SDK for Flutter enables Over-the-air translations update from Localizely cloud platform

Homepage

License

unknown (LICENSE)

Dependencies

http, intl, logger, package_info, petitparser, shared_preferences, uuid

More

Packages that depend on localizely_sdk