Flutter Community
Published in

Flutter Community

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…

--

--

--

Articles and Stories from the Flutter Community

Recommended from Medium

Build a simple Pie Chart with HTML and CSS

How to Remote Development using SSH

Sending email via Python

Avoiding Coding Pitfalls with Performance Signatures

Serverless experiments with AWS and Azure, trying to efficiently convert GeoTiff to COG.

Installing Hortonworks Sandbox in Google Cloud Platform GCP using Docker

Moving Beyond Newtonian Reductionism in the Management of Large-Scale Distributed Systems, Part 1

Avoid API documentation nightmares using Postman for your next project

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Suragch

Suragch

Flutter and Dart developer. Twitter: @suragch1

More from Medium

Flutter & Flame Step 7: Play the game

Daria’s Flutter diaries #2

Undo/Redo Mechanism with Riverpod in Flutter

New In Flutter 2.8, Screenshot Goldens In Integration Testing