localizable_annotation 0.0.3 copy "localizable_annotation: ^0.0.3" to clipboard
localizable_annotation: ^0.0.3 copied to clipboard

An annotation for localizable, so Localization can be created automatically.

localizable_annotation #

An annotation for localizable, so Localization can be created automatically. Required by localizable package.

Getting Started #

Add localizable_annotation as dependency on your project

dependencies:
  localization_annotation: ^0.0.3

Then you can now annotate your Translation class like this

import 'package:localizable_annotation/localizable_annotation.dart';

@Localizable(
  className: "AppLocalization",
)
class AppTranslations {
  static const Map<String, Map<String, String>> translations = {
    'en': {
      'title': 'Flutter Demo',
      'description': 'A Flutter Demo',
      'greetings': 'Hello {name}!',
    },
    'id': {
      'title': 'Demo Flutter',
      'description': 'Sebuah Demo Flutter',
      'greetings': 'Halo {name}!',
    },
  };

  static const String defaultLocale = 'en';
}
1
likes
130
pub points
4%
popularity

Publisher

unverified uploader

An annotation for localizable, so Localization can be created automatically.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

More

Packages that depend on localizable_annotation