If your users speak another language, youβll need to localize your Flutter app πΊ
Hereβs how to setup Flutter app localizations in just 5 minutes, using code generation.
Also covered: template vs non-template files and synthetic vs non-synthetic package. π
π§΅
1οΈβ£ As a first step, we need to add the required packages to the pubspec.yaml file.
2οΈβ£ Create l10n.yaml at the root
βοΈ arb-dir is the input folder where Flutter will look for the localized strings
βοΈ output-dir is where the localizations classes will be generated
βοΈ template-arb-file is the main template that contains a description for each localized message
What's the difference between errors and exceptions in Flutter?
β Errors are programmer mistakes. They are fatal and we should not try to recover from them
β Exceptions are failure conditions that are out of our control. We should handle them and recover gracefully
Thread π§΅
Errors are fatal and when they happen the program *cannot* recover normally.
β we want to discover (and fix) them as early as possible in the development process
β we should track them in production using a crash reporting solution, so that we can measure impact and severity