auto_localized 0.2.0 copy "auto_localized: ^0.2.0" to clipboard
auto_localized: ^0.2.0 copied to clipboard

outdated

Easy to use runtime-safe Flutter app localization tool using code generation.

example/lib/main.dart

import 'package:example/localization.al.dart';
import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Auto Localized Example',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      supportedLocales: context.supportedLocales,
      localizationsDelegates: context.localizationsDelegates,
      home: HomePage(),
    );
  }
}

class HomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(
          context.translate(Strings.welcome),
        ),
      ),
      body: Center(
        child: Text(
          context.translate(Strings.testMessage),
        ),
      ),
    );
  }
}
22
likes
0
points
212
downloads

Publisher

unverified uploader

Weekly Downloads

Easy to use runtime-safe Flutter app localization tool using code generation.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, flutter_localizations

More

Packages that depend on auto_localized