sync_wording 1.2.0 copy "sync_wording: ^1.2.0" to clipboard
sync_wording: ^1.2.0 copied to clipboard

A dart command-line application to generate localization assets and class files used by your Flutter application from a GoogleSheet document.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:sync_wording_example/localizations/generated/app_localizations.dart';

void main() {
  runApp(const MyApp());
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'SyncWording Demo',
      localizationsDelegates: AppLocalizations.localizationsDelegates,
      supportedLocales: AppLocalizations.supportedLocales,
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: Text(AppLocalizations.of(context)!.hello),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text(AppLocalizations.of(context)!.welcome),
            const SizedBox(height: 20),
            Text(AppLocalizations.of(context)!.date(DateTime.now())),
          ],
        ),
      ),
    );
  }
}
1
likes
160
points
86
downloads

Publisher

verified publisherbto.tf

Weekly Downloads

A dart command-line application to generate localization assets and class files used by your Flutter application from a GoogleSheet document.

Repository (GitHub)
View/report issues

Topics

#localization #translation #wording #l10n #arb

Documentation

API reference

License

MIT (license)

Dependencies

args, collection, googleapis, googleapis_auth, http, yaml

More

Packages that depend on sync_wording