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

OTA localization for Flutter: update translations and add languages without an app release while keeping generated AppLocalizations APIs.

example/example.dart

import 'package:rerune/rerune.dart';

/// Initializes ReRune with the localization config generated for your app.
///
/// Pass `reRuneAppLocalizationsConfig`, generated by `dart run rerune`, as
/// [localizations].
Future<void> initializeReRune({
  required String otaPublishId,
  required ReRuneLocalizationsConfig<dynamic> localizations,
}) {
  return ReRune.setup(
    otaPublishId: otaPublishId,
    localizations: localizations,
    updatePolicy: const ReRuneUpdatePolicy(
      checkOnStart: true,
      periodicIntervalInHours: 6,
    ),
  );
}

/// Requests an immediate translation refresh.
Future<ReRuneUpdateResult> refreshTranslations() {
  return ReRune.checkForUpdates();
}
0
likes
160
points
1.03k
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

OTA localization for Flutter: update translations and add languages without an app release while keeping generated AppLocalizations APIs.

Homepage
View/report issues

Topics

#localization #i18n #translations #ota #code-generation

License

MIT (license)

Dependencies

analyzer, build, flutter, glob, http, intl, path_provider, shared_preferences, yaml

More

Packages that depend on rerune