flutter_translate_gen 1.2.4

  • Readme
  • Changelog
  • Example
  • Installing
  • 80

flutter_translate_gen #

pub package License: MIT Flutter.io

Statically-typed localization keys generator for flutter translate

Please check this wiki page for documentation on how to generate static localization keys.

And here you can find a fully working example.

Issues #

Please file any issues, bugs or feature request here.

License #

This project is licensed under the MIT License

Author #

This Flutter package is developed by Florin Bratan. You can contact me at florin@leadcode.dev

1.0.0 #

  • Initial release

1.1.0 #

  • Implemented multiple case style options

1.2.0 #

  • Added support for pluralization
  • '0', '1' and 'else' are now reserved words

1.2.4 #

  • Fixed dependency compatibility issues

example/lib/main.dart

main() {
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  flutter_translate_gen: ^1.2.4

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:flutter_translate_gen/flutter_translate_gen.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
69
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
80
Overall:
Weighted score of the above. [more]
80
Learn more about scoring.

We analyzed this package on Jul 8, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.14

Analysis suggestions

Package not compatible with SDK flutter

Because it is not compatible with any of the supported runtimes: flutter-native, flutter-web

Package not compatible with runtime flutter-native on android

Because:

  • package:flutter_translate_gen/flutter_translate_gen.dart that imports:
  • package:source_gen/source_gen.dart that imports:
  • package:source_gen/src/type_checker.dart that imports:
  • dart:mirrors

Package not compatible with runtime flutter-native on ios

Because:

  • package:flutter_translate_gen/flutter_translate_gen.dart that imports:
  • package:source_gen/source_gen.dart that imports:
  • package:source_gen/src/type_checker.dart that imports:
  • dart:mirrors

Package not compatible with runtime flutter-native on linux

Because:

  • package:flutter_translate_gen/flutter_translate_gen.dart that imports:
  • package:source_gen/source_gen.dart that imports:
  • package:source_gen/src/type_checker.dart that imports:
  • dart:mirrors

Package not compatible with runtime flutter-native on macos

Because:

  • package:flutter_translate_gen/flutter_translate_gen.dart that imports:
  • package:source_gen/source_gen.dart that imports:
  • package:source_gen/src/type_checker.dart that imports:
  • dart:mirrors

Package not compatible with runtime flutter-native on windows

Because:

  • package:flutter_translate_gen/flutter_translate_gen.dart that imports:
  • package:source_gen/source_gen.dart that imports:
  • package:source_gen/src/type_checker.dart that imports:
  • dart:mirrors

Package not compatible with runtime flutter-web on web

Because:

  • package:flutter_translate_gen/flutter_translate_gen.dart that imports:
  • package:source_gen/source_gen.dart that imports:
  • package:source_gen/src/utils.dart that imports:
  • package:build/build.dart that imports:
  • package:build/src/generate/run_post_process_builder.dart that imports:
  • package:build/src/builder/post_process_builder.dart that imports:
  • package:build/src/builder/builder.dart that imports:
  • package:build/src/builder/build_step.dart that imports:
  • package:build/src/asset/reader.dart that imports:
  • package:glob/glob.dart that imports:
  • package:glob/src/list_tree.dart that imports:
  • package:glob/src/io.dart that imports:
  • package:glob/src/io_export.dart that imports:
  • dart:io

Package not compatible with runtime js

Because:

  • package:flutter_translate_gen/flutter_translate_gen.dart that imports:
  • package:source_gen/source_gen.dart that imports:
  • package:source_gen/src/utils.dart that imports:
  • package:build/build.dart that imports:
  • package:build/src/generate/run_post_process_builder.dart that imports:
  • package:build/src/builder/post_process_builder.dart that imports:
  • package:build/src/builder/builder.dart that imports:
  • package:build/src/builder/build_step.dart that imports:
  • package:build/src/asset/reader.dart that imports:
  • package:glob/glob.dart that imports:
  • package:glob/src/list_tree.dart that imports:
  • package:glob/src/io.dart that imports:
  • package:glob/src/io_export.dart that imports:
  • dart:io

Package not compatible with runtime native-aot

Because:

  • package:flutter_translate_gen/flutter_translate_gen.dart that imports:
  • package:source_gen/source_gen.dart that imports:
  • package:source_gen/src/type_checker.dart that imports:
  • dart:mirrors

Health issues and suggestions

Document public APIs. (-0.17 points)

34 out of 35 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Format lib/annotation_generator.dart.

Run dartfmt to format lib/annotation_generator.dart.

Format lib/builder.dart.

Run dartfmt to format lib/builder.dart.

Format lib/flutter_translate_gen.dart.

Run dartfmt to format lib/flutter_translate_gen.dart.

Format lib/keys_class_generator.dart.

Run dartfmt to format lib/keys_class_generator.dart.

Format lib/localized_item.dart.

Run dartfmt to format lib/localized_item.dart.

Maintenance issues and suggestions

Homepage URL doesn't exist. (-20 points)

At the time of the analysis the homepage field https://leadcode.dev was unreachable.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
analyzer >=0.36.4 <1.0.0 0.39.12
build >=1.2.1 <2.0.0 1.3.0
code_builder >=3.2.0 <4.0.0 3.3.0
dart_casing ^1.0.1 1.0.1
dart_utils ^1.0.2 1.0.2
flutter_translate_annotations ^1.0.1 1.0.1
glob ^1.2.0 1.2.0
source_gen >=0.9.4 <1.0.0 0.9.5
Transitive dependencies
_fe_analyzer_shared 5.0.0
args 1.6.0
async 2.4.2
built_collection 4.3.2
built_value 7.1.0
charcode 1.1.3
collection 1.14.13
convert 2.1.1
crypto 2.1.5
csslib 0.16.1
dart_style 1.3.6
fixnum 0.10.11
html 0.14.0+3
js 0.6.2
logging 0.11.4
matcher 0.12.8
meta 1.2.1
node_interop 1.1.1
node_io 1.1.1
package_config 1.9.3
path 1.7.0
pedantic 1.9.1
pub_semver 1.4.4
quiver 2.1.3
source_span 1.7.0
stack_trace 1.9.5
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.2.0
watcher 0.9.7+15
yaml 2.2.1
Dev dependencies
build_runner >=1.7.0 <2.0.0