localizable_annotation 0.0.3 icon indicating copy to clipboard operation
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
56%
popularity

Publisher

unverified uploader

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

Repository (GitHub)

Documentation

API reference

License

Icon for licenses.BSD-3-Clause (LICENSE)

More

Packages that depend on localizable_annotation