How to Underline Text on Hover in FlutterFlow?

Widgets & Design

Hi everyone,

I’m trying to underline text when hovered in FlutterFlow, but I haven't found a built-in way to do this. I know Flutter normally allows this using MouseRegion and,TextDecoration.underline but since FlutterFlow doesn’t expose TextDecoration directly, I’m unsure how to achieve this within the platform.

Does anyone know a native FlutterFlow way to underline text on hover? Or do I have to rely fully on a custom widget? If so, what’s the best approach to make it work within FlutterFlow’s constraints?

Thanks in advance!

What have you tried so far?
  1. Conditional Visibility Approach – Creating two text widgets (one underlined, one normal) and toggling visibility using a MouseRegion.

  2. Custom Widget – I attempted to create a custom widget using MouseRegion and setState(), but FlutterFlow gave an error regarding missing width parameters.

  3. Actions & Animations – I looked into adding a hover-based action, but I couldn’t find a way to modify the text style dynamically.

Did you check FlutterFlow's Documentation for this topic?
Yes
4
1 reply