A visual guide to text affinity in Flutter

If you don’t crawl around the Flutter source code much you’ve probably never heard of text affinity, represented by the TextAffinity enum. It’s an interesting concept, though, and in this article I’ll try to make it easy to understand through the use of images.
The word affinity means attraction. This is referring to which part of the text the cursor (or caret as it’s sometimes called) is…