A demo to demonstrate highlight on Flutter

A demo to demonstrate highlight on Flutter

Flutter highlight text demo .A demo to demonstrate highlight on Flutter .This demo is based on @Jaime's selection example with my modification on his rendering text logic.

Flutter highlight text demo

This demo is based on @Jaime's selection example with my modification on his rendering text logic.



I know there might be a better way to achieve such feature considering mine's operate the text on a character level...

and convert each single character into TextSpan, which might cause space waste? I guess?

But in my investigation, I found that Flutter engine is actually turning all the TextSpan into the String text of the EditableText on rendering...

So... that space waste might not actually happen?

I need to dig deeper into the source code...

So far, there's two known issues I think it's due to the fact that the Flutter still has room to improve

  1. TextSelection is inaccurate(baseOffset and extentOffset) when there's emoji involved
  2. Selection background's height will be inconsistent between Chinese and English, which I have opened an issue for that, I hope I will have the energy to open PR for it, I'm so depressed by my life right now 😢...

Download Details:

Author: SeasonLeee

Source Code: https://github.com/SeasonLeee/highlight_text_demo

flutter dart mobile-apps

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Google's Flutter 1.20 stable announced with new features - Navoki

Google has announced new flutter 1.20 stable with many improvements, and features, enabling flutter for Desktop and Web

Top 25 Flutter Mobile App Templates in 2020

Flutter has been booming worldwide from the past few years. While there are many popular mobile app development technologies out there, Flutter has managed to leave its mark in the mobile application development world. In this article, we’ve curated the best Flutter app templates available on the market as of July 2020.

Flutter App Development Trends 2020

As the new decade dawns upon us, a slew of technologies has been making a lot of noise to grab the developers’ attention. While native app development is going strong, the trade winds are now blowing towards going cross-platform.

How To Succeed In Mobile App Wireframe Design?

This article covers everything about mobile app wireframe design: what to do and what not, tools used in designing a mobile or web app wireframe, and more.

What is Flutter and why you should learn it?

Flutter is an open-source UI toolkit for mobile developers, so they can use it to build native-looking Android and iOS applications from the same code base for both platforms. Flutter is also working to make Flutter apps for Web, PWA (progressive Web-App) and Desktop platform (Windows,macOS,Linux).