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

outdated

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
0
pub points
0%
popularity

Publisher

verified publisherinfinum.com

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

License

unknown (license)

Dependencies

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

More

Packages that depend on polyglothq