NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #785 most downloaded on pub.dev
Flutter support for slang. This library provides helpful Flutter API.
Last release 2 months ago
06 Aug 2026
Ships fairly regularly
a new release about every 5 weeks
Nearly every release is documented
notes for 57 of the last 60 stable releases
2 versions withdrawn
withdrawn after publishing
4 years old
70 releases · first in 2022
One column per quarter.
See https://pub.dev/packages/slang/changelog
Nothing published for this version
Nothing published for this version
feat: respect all locale preferences of the device instead of only the first locale
--preserve-order flag to slang applyfeat: Region Extensions, de-CH will fall back to de before falling back to the base locale
de-CH will fall back to de before falling back to the base locale[any]-DE.json will spread to all existing language codes, useful to set a currency for a region without managing every combination of language and region (e.g. en-DE, fr-DE, de-DE)feat: automatically fix common casing typos during slang wip apply based on existing translations and majority vote
slang wip apply based on existing translations and majority vote@@notes in translation files to give LLMs more contextDEPRECATED: Do not specify paths for interfaces in config, use interface modifier in the translation keys instead (e.g. myKey(interface=MyInterface) )
generate_mixin to interfaces config to allow predefined mixins instead of generating new ones (#347)build_runner build --workspace, requires build_runner: ^2.12.1 (#348)myKey(interface=MyInterface))feat: also format base locale when running slang normalize ( #344 ) @adil192
slang normalize (#344) @adil192feat: announcing slang_mcp , a new package to work with LLMs more efficiently
feat: add t.$wip('Welcome $name') or t.$wip.welcome.title('Welcome $name') for key-less prototyping without code generation
t.$wip('Welcome $name') or t.$wip.welcome.title('Welcome $name') for key-less prototyping without code generationdart run slang wip apply to add the translations to resources and update the Dart code accordingly${arg} to $arg if possiblefeat: add // dart format off for generated files ( #320 ) @adil192
Added support for custom contexts.
Example:
{
"greet": {
"male": "Hello Mr $name",
"female": "Hello Ms $name"
}
}
String a = t.greet(name: 'Anna', context: GenderContext.female);
For more information, see README.
feat: combine namespaced and non-namespaced translations
Detect pluralization automatically, configure it via pluralization->auto: cardinal / ordinal
feat: add autodoc feature enabled by default that generates the base translation as documentation for the translation keys
autodoc feature enabled by default that generates the base translation as documentation for the translation keys (#218)slang analyze supports --source-dirs (#309) @khoadngslang configure supports --source-dirs (#308) @khoadngbuild constraint in slang_build_runnerflat_map: falsefallback_strategy configuration, possible values strict (default), base_localeflutter pub run fast_i18n watch (experimental)feat: remove json2yaml dependency, reimplement a simple opinionated YAML writer
json2yaml dependency, reimplement a simple opinionated YAML writerfeat: add Translations.$copyWith() and TranslationMetadata.getOverride to allow adding custom behavior
feat: add dart run slang configure to configure CFBundleLocalizations in Info.plist based on existing translation files
zero quantity to cs, de, en and vi (not breaking)dev_dependenciesfeat: add (fallback) modifier to fallback entries within a map
(fallback) modifier to fallback entries within a map (#268)fallback_strategy: base_locale_empty_stringnull_safety: false in build.yamlflutter pub run fast_i18n ignores build.yaml files without fast_i18n entry_renderedResolversDEPRECATED: Do not use namespaces in file names when namespaces are disabled: strings_de.json -> de.json
strings_de.json -> de.jsonstrings.json -> strings_en.json, except the locale is specified in the directory nameNote: This might make the files order in your IDE less pleasant if input and output files are in the same directory.
You can specify the output directory to a subdirectory to avoid this.
For example, output_directory: lib/i18n/gen
feat: automatically sanitize invalid keys (e.g. continue , 123 )
continue, 123) (#257)locale in L10n format definitionAppLocale has a new property called flutterLocaleflutter pub run fast_i18n which is much faster than flutter pub run build_runner build --delete-conflicting-outputsA rebuild is needed: flutter pub run build_runner build .
A rebuild is needed: flutter pub run build_runner build.
strings_en_US)strings_zh-Hant-TW)LocaleSettings.supportedLocales statically without library callTranslations.of(context).The typed version is now first class.
The typed version is now first class.
setLocale -> setLocaleRaw, setLocaleTyped -> setLocalelocales -> supportedLocalesRawAppLocale.toLanguageTag -> AppLocale.languageTagtranslation_class_visibility in build.yaml (in most cases just keep it private!)edit -> rebuild i18n -> hot reload works now for faster developmentDateFormat, NumberFormat, and Lazy loading
Format translations with DateFormat and NumberFormat:
Hello {name}, today is {today: yMd}. You have {money: currency(symbol: '€')}.
On web, Deferred loading is used to reduce initial load time.
DateFormat and NumberFormat support (#112)lazy: true config which is enabled by default (#135)slang analyze should not treat translations as unused if they are used in linked translations (#231)slang analyze should detect missing enums (#234)"male, female": "..." to "male,female": "...") (#247)key_case is set (#253)setLocale, setLocaleRaw, and useDeviceLocale returns a Future, use -Sync suffix for synchronous callsoutput_format removed, always generates multiple files nowLocaleSettings (supportedLocales, supportedLocalesRaw) removedbuild.yaml or slang.yaml (deprecated in v3.19.0)context are no longer transformed into pascal case keeping the original caseYou can read the detailed migration guide here.
Nothing published for this version
Nothing published for this version
feat: add dart run slang normalize to normalize translations based on base locale @Tienisto
dart run slang normalize to normalize translations based on base locale @Tienistofeat: add parameter types (e.g. Hello {name: String}, you are {age: int} years old ); is Object by default @Tienisto
feat: dart run slang analyze supports csv files ( #185 ) @nikaera
dart run slang analyze supports csv files (#185) @nikaerapart of directive when using a custom dart file extension (#187) @cmenkemellerfeat: add fallback_strategy: base_locale_empty_string to also treat empty strings as missing translations
feat: add support for ARB files
fix: should not escape special characters when parsed via the "Translation Overrides" feature
fix: generate correct compatibility typedef for Translations class
Translations class (#176)feat: base translation class is named Translations so that Translations.of(context) returns the same type
feat: add dart run slang clean to remove unused translations after running slang analyze
dart run slang clean to remove unused translations after running slang analyze (#141)--exit-if-changed to slang analyze to fail CI if there are missing / unused translations (#141)contextBuilder and nBuilder parameter in rich text if not needed (#168)feat: slang edit add respects order in base locale ( @adil192 )
slang edit add respects order in base locale (@adil192)slang edit add works without a specified locale, it will add the string to all localesWidgetsBinding.instance.platformDispatcher instead of PlatformDispatcher.instance in findDeviceLocale implementationfeat: support multiple TranslationProvider at the same time when using multiple packages
TranslationProvider at the same time when using multiple packagesbuild_runnerfeat: announcing slang_gpt , a new package to generate translations with GPT
fix: migrate away from deprecated WidgetsBinding.instance.window in findDeviceLocale implementation
feat: add slang edit add (short: slang add ) to add new translations ( #150 ) (by @adil192 )
DEPRECATED: Use explicit context modifier instead of relying on the config file (see migration guide )
enum in the config anymore)slang edit copy to copy translationscontext modifier instead of relying on the config file (see migration guide)feat: add slang edit to move or delete translations over all locales
slang edit to move or delete translations over all localesfix: setLocale does not work when Locale enum is from two packages (by @fzyzcjy )
slang outdated should skip missing translations instead of throwing an errorfeat: add obfuscation config to obfuscate translation strings
obfuscation config to obfuscate translation stringsfeat: add OUTDATED modifier to flag translations as outdated ( slang analyze will treat them as missing)
OUTDATED modifier to flag translations as outdated (slang analyze will treat them as missing)flutter pub run slang outdated my.key.path to flag translations as outdatedslang apply prefers modifiers from base locale over secondary localesfeat: LocaleSettings.useDeviceLocale listens to device locale changes
LocaleSettings.useDeviceLocale listens to device locale changesflutter pub run slang apply only applies changed locales by defaultzh-Hant-TW uses zh-TW instead of zh-HK)feat: generated files from analyze and apply have \n at the end of the file
analyze and apply have \n at the end of the filefeat: mixins generated by the interface feature have == and hashCode overrides
== and hashCode overridesflutter pub run slang apply respects the order in the base locale instead of simply add the new translations to the endflutter pub run slang analyze have --split-missing and --split-unused (in addition to --split) so only one of both can be a single filefeat: add (ignoreMissing) and (ignoreUnused) modifiers which changes the behaviour of flutter pub run slang analyze
(ignoreMissing) and (ignoreUnused) modifiers which changes the behaviour of flutter pub run slang analyzefeat: there is now a default plural resolver so the app keeps working in production when you forgot to define one, you will only see a warning in the
key_map_case should work with (map) modifierfeat: improve interface attribute inference algorithm
lib/gen/<filename> in Flutter environment by default if input is outside of lib/ and no output directory is givenDEPRECATED: LocaleSettings.supportedLocales and LocaleSettings.supportedLocalesRaw
(interface=<Interface>) and (singleInterface=<Interface>) modifiers, a new approach to configure interfaces without touching the config fileAppLocaleUtils.supportedLocales and AppLocaleUtils.supportedLocalesRaw, this API works in locale_handling: falseLocaleSettings.supportedLocales and LocaleSettings.supportedLocalesRawfeat: official web support
feat: RichText supports links inside default translation
flutter pub run slang watch works recursively and does not crash on errorfeat: csv decoding now support both CRLF and LF , " and '
CRLF and LF, " and 'LocaleSettings.setPluralResolver should not throw an assertion errorflutter pub run slang migrate should also work without : in commandfeat: add --locale=<locale> argument to flutter pub run slang apply to only apply a specific locale
--locale=<locale> argument to flutter pub run slang apply to only apply a specific locale--flat argument for flutter pub run slang analyze and apply is no longer availablefeat: flutter pub run slang analyze now also checks unused translations (on top of missing translations)
flutter pub run slang analyze now also checks unused translations (on top of missing translations)slang analyze over slang:analyze (and for all other commands); both styles are supported howeverfeat: add command flutter pub run slang:apply to add translations from the slang:analyze result
flutter pub run slang:apply to add translations from the slang:analyze resultisFlatMap parameter when overriding translations correctlyfeat: add command flutter pub run slang:analyze to report missing translations
flutter pub run slang:analyze to report missing translationsadd type-safe functions LocaleSettings.setLocaleTyped and LocaleSettings.currentLocaleTyped
New Features:
LocaleSettings.setLocaleTyped and LocaleSettings.currentLocaleTypedBreaking:
output_translate_var renamed to translate_var in build.yaml config fileTranslation Overrides and Enhanced Modifiers
LocaleSettings.overrideTranslations (checkout updated README)myKey(plural, rich)n; you can revert this by setting pluralization/default_parameter: countapples(param=appleCount)All breaking changes will result in a compile-time error, so don't worry for "hidden" bugs :)
You can read the detailed migration guide here.
Nothing published for this version
feat: add AppLocaleUtils.parseLocaleParts
AppLocaleUtils.parseLocalePartsLocaleSettings.useDeviceLocale now does not complain of weird locales on Linuxfeat: ignore empty plural / context nodes when fallback_strategy: base_locale is used
fallback_strategy: base_locale is usedcoverage:ignore-file to generated file and ignore every lintYour coding agent can read these notes before it upgrades. Set up the MCP server →