easy_localization_loader 0.0.2

  • Readme
  • Changelog
  • Installing
  • 87

Custom assets loaders for Easy Localization package #

Pub Version Code Climate issues GitHub closed issues GitHub contributors GitHub repo size GitHub forks GitHub stars

CodeFactor Grade GitHub license

Supported formats #

  • [x] JSON (JsonAssetLoader)
  • [x] CSV (CsvAssetLoader)
  • [x] HTTP (HttpAssetLoader)
  • [x] XML (XmlAssetLoader, XmlSingleAssetLoader)
  • [x] Yaml (YamlAssetLoader, YamlSingleAssetLoader)
  • [x] FILE (FileAssetLoader)

Configuration #

  1. Add this to your package's pubspec.yaml file:
dependencies:
  #Easy Localization main package
  easy_localization: <last_version>

    # stable version install from https://pub.dev/packages
  easy_localization_loader: <last_version>

  # Dev version install from git REPO
  easy_localization_loader:
    git: https://github.com/aissat/easy_localization_loader.git

  1. Change assetLoader and patch
...
void main(){
  runApp(EasyLocalization(
    child: MyApp(),
    supportedLocales: [Locale('en', 'US'), Locale('ar', 'DZ')],
    path: 'resources/langs/langs.csv',
    assetLoader: CsvAssetLoader()
  ));
}
...
  1. All done!.

[0.0.1] #

  • initial release

Use this package as a library

1. Depend on it

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


dependencies:
  easy_localization_loader: ^0.0.2

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

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

3. Import it

Now in your Dart code, you can use:


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

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

  • Dart: 2.8.4
  • pana: 0.13.13
  • Flutter: 1.17.5

Analysis suggestions

Package not compatible with SDK dart

because of import path [easy_localization_loader] that is in a package requiring null.

Package not compatible with runtime flutter-web on web

Because of the import of dart:io via the import chain package:easy_localization_loader/easy_localization_loader.dartpackage:easy_localization_loader/src/file_asset_loader.dartdart:io

Health suggestions

Format lib/easy_localization_loader.dart.

Run flutter format to format lib/easy_localization_loader.dart.

Maintenance issues and suggestions

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (xml).

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and easy_localization_loader.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
csv ^4.0.3 4.0.3
flutter 0.0.0
http ^0.12.0+2 0.12.1
xml ^3.5.0 3.7.0 4.2.0
yaml ^2.2.0 2.2.1
Transitive dependencies
charcode 1.1.3
collection 1.14.12 1.14.13
convert 2.1.1
http_parser 3.1.4
meta 1.1.8
path 1.7.0
petitparser 3.0.4
sky_engine 0.0.99
source_span 1.7.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6 1.2.0
vector_math 2.0.8
Dev dependencies
flutter_test
pedantic ^1.8.0+1 1.9.0 1.9.1