Skip to content
pubscout

slang_flutter

4.19.0, released 3 months ago by tienisto.com

Flutter support for the slang localization library.

WASM-readyRock solid
$ flutter pub add slang_flutter
Source repository

What it does

Provides Flutter‑specific helpers for the slang code‑generated localization system. Adds BuildContext extensions to rebuild widgets on locale changes and RichText support. Offers utilities to use the device locale and list supported locales.

AI-written summary of version 4.19.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You already use the slang package for code‑generated translations
  • You need automatic widget rebuilds on locale change in Flutter
  • You want RichText support for localized strings

Skip it when

  • You are not using slang for localization
  • You need a full‑featured i18n solution with plural rules, date formatting, etc.

Strengths

  • Seamless BuildContext integration
  • RichText localization support
  • Convenient device‑locale helpers

Weaknesses

  • Works only with the slang package
  • Limited to the features it wraps

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
2
final t = Translations.of(context);
String hello = t.hello;
String hello2 = context.t.hello; // rebuild on locale change

Alternatives

Packages that do the same job and could replace slang_flutter.

Works with

Packages commonly used together with slang_flutter: ones it builds on, ones built on it, and its own family.