Visual Studio Code (Flutter - Dart) Localization for String

Опубликовано: 01 Декабрь 2019
на канале: Ferer Atlus
833
10

This will help you create strings for english, nihongo, and русский with the use of json, create a dart class of AppLocalizations that will use for dynamic change of strings when you change your default language. also teach you to add assets in the pubspec.yaml.

supportedLocales - List all of the app's supported locales here
localizationsDelegates - These delegates make sure that the localization data for the proper language is loaded
AppLocalizations.delegate - A class which loads the translations from JSON files
GlobalMaterialLocalizations.delegate - Built-in localization of basic text for material widgets
GlobalWidgetsLocalizations.delegate - Buiilt-in localization for text direction LTR/RTL
localeResolutionCallback - Returns a locale which will be used by the app

Learn to use Null optional default value with dart, Ternary operator based on the code of checking it can scroll or not

These are the Widgets and other components that will help you in designing dynamic layout

FractionallySizedBox - A widget that sizes its child to a fraction of the total available space
widthFactor - Accumulate percentage of the width for Parent Widget
heightFactor - Accumulate percentage of the height for Parent Widget
Row - Like Linearlayout orientation horizontal in android
NeverScrollableScrollPhysics - to disable the scroll
AlwaysScrollableScrollPhysics - to enable the scroll
Stack - Like Relativelayout in android

➤Source Code:
https://github.com/benedictcontawe/Fl...