flutter_localized_locales 1.0.1 copy "flutter_localized_locales: ^1.0.1" to clipboard
flutter_localized_locales: ^1.0.1 copied to clipboard

outdated

Locale code (ISO 639‑2 and ISO 639-3) to name mappings for 563 locales

example/example.dart

import 'package:flutter/material.dart';
import 'package:flutter_localized_locales/flutter_localized_locales.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      localizationsDelegates: [
        LocaleNamesLocalizationsDelegate(),
        // ... more localization delegates
      ],
      home: Home(),
    );
  }
}

class Home extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        Text(LocaleNames.of(context).nameOf('en_GB')),
        // If the locale isn't supported
        Text(LocaleNames.of(context).nameOf('zzzz')),
        // If the locale is invalid, but a match can be found
        Text(LocaleNames.of(context).nameOf('es_ZZZ')),
      ],
    );
  }
}
51
likes
0
pub points
97%
popularity

Publisher

verified publisherguidez.pl

Locale code (ISO 639‑2 and ISO 639-3) to name mappings for 563 locales

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, flutter_localizations, intl

More

Packages that depend on flutter_localized_locales