rerune 0.3.0
rerune: ^0.3.0 copied to clipboard
OTA localization updates for Flutter apps with build_runner code generation.
rerune #
OTA localization updates for Flutter apps using build_runner generation.
Install #
dependencies:
rerune: ^0.3.0
dev_dependencies:
build_runner: ^2.4.13
Quick start #
1) Generate Flutter localizations #
flutter gen-l10n
2) Add codegen anchor #
Create lib/l10n/rerune_app_localizations_overlay.dart:
import 'package:flutter/widgets.dart';
import 'package:rerune/rerune.dart';
import 'gen/app_localizations.dart';
part 'rerune_app_localizations_overlay.rerune.g.dart';
@ReRuneLocalizationsOverlay(localizationsClassName: 'AppLocalizations')
class _ReRuneAppLocalizationsOverlayAnchor {}
3) Run build_runner #
dart run build_runner build --delete-conflicting-outputs
4) Wire app startup #
import 'package:rerune/rerune.dart';
import 'l10n/rerune_app_localizations_overlay.dart';
void main() {
ReRune.setup(
otaPublishId: 'your-ota-publish-id',
localizations: reRuneAppLocalizationsConfig,
updatePolicy: const ReRuneUpdatePolicy(checkOnStart: true),
);
runApp(const MyApp());
}
MaterialApp(
localizationsDelegates: ReRune.localizationsDelegates,
supportedLocales: ReRune.supportedLocales,
)
Updates and refresh #
- Trigger refresh manually:
await ReRune.checkForUpdates() - Listen for applied updates:
ReRune.onFetchedTextsApplied.listen(...) - Auto-redraw widget subtree:
ReRuneOverlayBuilder(builder: ...)
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