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

Flutter package which provides locale code to name mappings for 563 locales.

example/lib/main.dart

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

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

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

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

class Home extends StatelessWidget {
  const Home({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Column(
        children: [
          Text(LocaleNames.of(context)!.nameOf('zzzz').toString()),
          Text(LocaleNames.of(context)!.nameOf('fr_CA').toString()),
        ],
      ),
    );
  }
}
51
likes
140
pub points
97%
popularity

Publisher

verified publisherguidez.pl

Flutter package which provides locale code to name mappings for 563 locales.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, intl

More

Packages that depend on flutter_localized_locales