MarcelGarus / marquee

A Flutter widget that scrolls text infinitely. Provides many customizations including custom scroll directions and velocities, pausing after every round and specifying custom durations and curves for accelerating and decelerating.
MIT License
274 stars 113 forks source link

Problem with AppBar #62

Closed chplalex closed 3 years ago

chplalex commented 3 years ago

Hello! I am trying to use Marquee with AppBar:

image

and I am getting the error:

image

What am I doing wrong?

MarcelGarus commented 3 years ago

I think the AppBar allows the Marquee to be as big as possible, so the Marquee doesn't know how high it should be. The same problem would occur if you tried to use a vertically scrolling ListView as the title.

If you wrap the Marquee in a SizedBox with a height of AppBar().prefferedSize.height, that should resolve your issue.

chplalex commented 3 years ago

Thank you. It works good.

image

SheepYang1993 commented 3 years ago

It works