Flutter is a good bilingual reading tool
A few days ago, when I was reading English documents, I needed to switch between the original text and the translation, so I came up with an idea, can I display the original text and the translation on one page at the same time?
Why not read the translation directly? I want to accumulate more vocabulary~
First of all, search the Internet for such reading tools, and find that most of them are typesetting in the form of a paragraph of the original text and a paragraph of translation. OK, rule out the possibility of useless work, roll up your sleeves and open them.
The knowledge points involved are mainly related to self drawing components, including layout, font size calculation and update time. Finally, I shut myself up for a day, and the small dark room came out, showing a good effect.
Because my garbage server has been blocked in this special period, I can only put it on GitHub, which is still too slow to hit people.
- Experience address:http://dev.kuyichang.com/works
Let’s take two pictures and leave an impression
At present, it has the following functions:
- Switch between day mode and night mode
- Set the font size of the original text (the size of the translation is calculated automatically)
- Set the spacing of paragraphs
- Set the color of the original text and translation
- Set the display mode to display only the original text, only the translation and reverse display.
We have built a wechat circle, welcome students who are interested in product practice to join us, let’s play together
Written on March 1, 2020
This article is published by the platform of multiple publicationsArtiPubAutomatic publishing