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

Vision Resource Model

Cargo Cult Programming — The Daily Software Anti-Pattern

How to master your Software Engineering journey: The 10x Engineer

AWS — Improving System Resilience While Being Commercially Reasonable.

AWS Cognito Logo

Chapter 5. Enable Password based Login In Prestodb

Accessing hidden information from your applications #MastersTip02

My First Postmortem: Let’s Start

PeopleStrong Technology — Know us More.

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


Flutter and Dart developer. Twitter: @suragch1

More from Medium

How To Add Custom Icons To Your Flutter Application

A Minimalist Guide to Isar

Flutter JSON and serialization

Relative vs package imports in Flutter and Dart