Reputation: 2288
I am using a Hero
animation in my App. During the transition, the text receives a thick yellow underline. I'm pretty sure this is a overflow warning (or something similar), but it persists even when I run flutter build apk
and flutter install
, i.e. it exists in production builds.
My app functions fine, so I'd like to hide these. How do I do so?
Upvotes: 4
Views: 2213
Reputation: 276931
During the transition, the text receives a thick yellow underline.
That is because Hero
transition is done trough Overlay
, which is rendered outside of Scaffold
or other Material
widgets.
The problem ? It means during transition, there's no widget that introduce a valid Theme
(Scaffold
, Dialog
, Material
do for example).
So it fallback to a default Theme
. And that Theme
has yellow underline with a big font.
The solution : Wrap your Hero
child into a widget introducing Theme
or in Theme
itself.
Upvotes: 3
Reputation: 657128
These bars are only shown in debug build.
For release builds use
flutter build apk --release
Upvotes: 2