internationalization 1.1.0+1 copy "internationalization: ^1.1.0+1" to clipboard
internationalization: ^1.1.0+1 copied to clipboard

outdated

A project to easily implement internationalization on flutter projects

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:internationalization/internationalization.dart';

import 'usage.dart';

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

class InternationalizationExampleApp extends StatelessWidget {
  InternationalizationExampleApp() {
    suportedLocales.addAll([
      const Locale('pt', 'BR'),
      const Locale('en', 'US'),
    ]);
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      supportedLocales: suportedLocales,
        localizationsDelegates: [
            InternationalizationDelegate(
                defaultLocale: Locale('pt', 'BR'),
                path: "./assets/strings",
            ),
            GlobalMaterialLocalizations.delegate,
            GlobalWidgetsLocalizations.delegate,
        ],
        home: Usage(),
    );
  }
}
20
likes
0
points
215
downloads

Publisher

unverified uploader

Weekly Downloads

A project to easily implement internationalization on flutter projects

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, flutter_localizations

More

Packages that depend on internationalization