slang_flutter 4.4.0 copy "slang_flutter: ^4.4.0" to clipboard
slang_flutter: ^4.4.0 copied to clipboard

Flutter support for slang. This library provides helpful Flutter API.

slang_flutter #

This is a support package for slang.

Import this package if you develop flutter apps.

dependencies:
  slang: <version>
  slang_flutter: <version>

RichText #

This package enables RichText support.

BuildContext translations #

This package adds BuildContext integration to rebuild all widgets on locale change.

// get translation instance and mark this widget for rebuild on locale change
final t = Translations.of(context);

String a = t.myTranslation;
String b = context.t.myTranslation; // build-in extensions for BuildContext

Additional API #

Some useful methods provided by this package.

// use current device locale, and listen to it when the user changes it in device settings
LocaleSettings.useDeviceLocale();

// get current device locale
AppLocale locale = AppLocaleUtils.findDeviceLocale();

// get supported locales (handy for MaterialApp)
List<Locale> locales = AppLocaleUtils.supportedLocales;
25
likes
160
points
62.9k
downloads

Publisher

verified publishertienisto.com

Weekly Downloads

Flutter support for slang. This library provides helpful Flutter API.

Repository (GitHub)
View/report issues
Contributing

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_localizations, slang

More

Packages that depend on slang_flutter