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

Macro-default ReRune OTA localization package for Flutter.

rerune #

Macro-default package for ReRune OTA localization updates.

Use this package as the default integration path.

Install #

dependencies:
  rerune: ^0.2.3

Quick start #

1) Generate Flutter localizations #

flutter gen-l10n

2) Add your overlay registration file #

Create lib/l10n/rerune_app_localizations_overlay.dart in your app:

import 'package:flutter/widgets.dart';
import 'package:rerune/rerune.dart';

import 'gen/app_localizations.dart';

void reRuneConfigureAppLocalizationsOverlay() {
  ReRune.configureLocalizationsOverlay(
    overlayDelegate: const ReRuneOverlayLocalizationsDelegate<AppLocalizations>(
      baseDelegate: AppLocalizations.delegate,
      overlayFactory: _wrapAppLocalizations,
    ),
    baseDelegates: AppLocalizations.localizationsDelegates,
    replacingType: AppLocalizations,
    supportedLocales: AppLocalizations.supportedLocales,
  );
}

AppLocalizations _wrapAppLocalizations(AppLocalizations base, Locale locale) {
  return _AppLocalizationsOverlay(base, locale);
}

class _AppLocalizationsOverlay extends AppLocalizations {
  _AppLocalizationsOverlay(this._base, this._locale) : super(_base.localeName);

  final AppLocalizations _base;
  final Locale _locale;

  @override
  String get title {
    final fallback = _base.title;
    return ReRune.resolveText(locale: _locale, key: 'title', fallback: fallback);
  }
}

3) Wire startup and MaterialApp #

import 'package:rerune/rerune.dart';

import 'l10n/rerune_app_localizations_overlay.dart';

void main() {
  reRuneConfigureAppLocalizationsOverlay();
  ReRune.setup(
    otaPublishId: 'your-ota-publish-id',
    updatePolicy: const ReRuneUpdatePolicy(checkOnStart: true),
  );
  runApp(const MyApp());
}

MaterialApp(
  localizationsDelegates: ReRune.localizationsDelegates,
  supportedLocales: ReRune.supportedLocales,
)

Refresh patterns #

  • Manual trigger: await ReRune.checkForUpdates()
  • Stream-driven updates: ReRune.onFetchedTextsApplied.listen(...)
  • UI auto-redraw helper: ReRuneOverlayBuilder(builder: ...)

Migration from old single-package flow #

  • Old flow: flutter pub run rerune
  • New rerune flow: no generator command; maintain app overlay file directly.

Package family #

  • rerune_core: shared runtime base package.
  • rerune: macro-default package (this package).
  • rerune_gen: codegen compatibility package.

Troubleshooting #

  • StateError during setup usually means otaPublishId is empty or overlay configuration was not called.
  • Make sure ReRune.configureLocalizationsOverlay(...) runs before reading ReRune.localizationsDelegates.

License #

This package is proprietary software.

  • Copyright (c) 2026 BasalBit GmbH. All rights reserved.
  • Commercial license terms: https://rerune.io/terms
  • Issue tracker: https://rerune.io/issue-tracker
0
likes
0
points
30
downloads

Publisher

unverified uploader

Weekly Downloads

Macro-default ReRune OTA localization package for Flutter.

Homepage
View/report issues

License

unknown (license)

Dependencies

flutter, rerune_core

More

Packages that depend on rerune