Site icon Flutter Packages | Pub dev Packages – Flutter Mobile App World

Nations

Features

nations assets

this package contains translated message to use out of the box , no need to add them any more example

final message = 'login'.tr
print(message);

also you did’t add login message in your assets and translate it to the your supported languages it will use the nation assets and gets you the correct translated message if the MaterialApp locale is arabic it will be تسجيل الدخول and if the locale is English it will be Sign In any so on out of the box

does this means i can’t override the login keyword ?

no the package will use the default values only if you don’t have one in you assets so you can override it any time

does this package have a big data sets ? – Will This Make The App very big ?

no this package will contains the necessary and the common keywords sings use in Authentication , Validation , searching , Filtering , introductions , …etc and will be added manually to choses carefully which means you gonna support more languages out of the box in the entire app

Still needs more ?

Example with queen_validators

why make it like this ?

Usage

we are still in beta stage star and wait for further releases

Decorations

attributes

which allows to customize the translated message

Example in validation : Arabic => “الحد الاقصي للحروف 255” English => “max length is 255”

255 is the max length and might changes some times is 255 or 55 or just 2 depend on the form how to achieve that in nations ?

"max_length_is":"max length is :count"

and in your code

final msg = 'max_length_is'.args({"count":255});

for now the generations is not done yet after we finish them no more String keys and dynamic parameters every thing will be hard type and stricter to avoid future bugs

Helpers

Download source code on GitHub

https://github.com/maxzod/nations
Exit mobile version