flutter_i18n 0.36.2 copy "flutter_i18n: ^0.36.2" to clipboard
flutter_i18n: ^0.36.2 copied to clipboard

i18n made easy for Flutter. With flutter_i18n you can make your app international, using just a simple .json, .xml, .yaml or .toml file!

example/lib/main.dart

import 'dart:async';

import 'package:flutter/material.dart';

import 'basic_example.dart' as basic_example;
import 'local_example.dart' as locale_example;
import 'namespace_example.dart' as namespace_example;
import 'network_example.dart' as network_example;

Future main() async {
  WidgetsFlutterBinding.ensureInitialized();
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        title: 'Flutter Demo',
        theme: ThemeData(
          primarySwatch: Colors.green,
        ),
        home: Scaffold(
            appBar: AppBar(title: const Text("Flutter i18n")),
            body: Builder(builder: (BuildContext context) {
              return Center(
                  child: Column(
                mainAxisAlignment: MainAxisAlignment.center,
                crossAxisAlignment: CrossAxisAlignment.center,
                children: <Widget>[
                  ElevatedButton(
                    key: const Key('basicExample'),
                    onPressed: () {
                      basic_example.main();
                    },
                    child: const Text("Run `basic` example"),
                  ),
                  ElevatedButton(
                    key: const Key('networkExample'),
                    onPressed: () {
                      network_example.main();
                    },
                    child: const Text("Run `network` example"),
                  ),
                  ElevatedButton(
                    key: const Key('nameSpaceExample'),
                    onPressed: () {
                      namespace_example.main();
                    },
                    child: const Text("Run `namespace` example"),
                  ),
                  ElevatedButton(
                    key: const Key('localeExample'),
                    onPressed: () {
                      locale_example.main();
                    },
                    child: const Text("Run `locale` example"),
                  )
                ],
              ));
            })));
  }
}
197
likes
140
points
25.5k
downloads

Publisher

unverified uploader

Weekly Downloads

i18n made easy for Flutter. With flutter_i18n you can make your app international, using just a simple .json, .xml, .yaml or .toml file!

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_localizations, flutter_web_plugins, http, intl, logging, path, rxdart, toml, xml2json, yaml

More

Packages that depend on flutter_i18n