polyglothq 1.1.7 copy "polyglothq: ^1.1.7" to clipboard
polyglothq: ^1.1.7 copied to clipboard

polyglothq is a Dart CLI to support using Polyglot for Flutter projects. polyglothq fetches translations from polyglothq.com, and converts them to a Flutter-suitable form.

example/lib/main.dart

import 'package:example/util/localization/strings.dart';
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.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(
      title: 'Polyglot Demo',
      localizationsDelegates: AppLocalizations.localizationsDelegates,
      supportedLocales: AppLocalizations.supportedLocales,
      home: HomeScreen(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Text(Strings.of(context).appName),
      ),
    );
  }
}
3
likes
140
points
58
downloads

Publisher

verified publisherinfinum.com

Weekly Downloads

polyglothq is a Dart CLI to support using Polyglot for Flutter projects. polyglothq fetches translations from polyglothq.com, and converts them to a Flutter-suitable form.

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

args, console, dio, get_it, japx, json_annotation, recase, yaml

More

Packages that depend on polyglothq