ilteoood / flutter_i18n

I18n made easy, for Flutter!
MIT License
218 stars 57 forks source link

How works loaders #160

Closed Leeeeerich closed 3 years ago

Leeeeerich commented 3 years ago

Hi! I inspired by yours library, and I want write my plugin for KMM platform. But I don't understand how works loaders and how the best keep data after parsing file for maximal performance. Maybe you have link to good article.

ilteoood commented 3 years ago

Hi, the code is public so you can easily investigate how it works. Briefly: the translation loader abstract class handle all the methods that a loader must implement in order to manage the current locale and the forced locale.

Another core interface is file content, that allow to implement different strategies to load in memory the translation file.