-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
only single child? not children? #5
Comments
The main use case of this library is to display one child over and over again. If you want to display different children every time, for now you can pass a Row as a child, something in the form of: |
if i use Row() ,there will be a problem(not bug) |
when marquee is unvisiable ,do you pause the timer ? |
It gets disposed when the Widget gets disposed, which to my understanding is when the widget is not visible. |
but why it scroll fastly when i reopen the app? |
Also, I thought about your case for some time and I decided I won't explicitly support multiple children... In fact, with the next version I'll not even accept a custom widget, only a text String and a TextStyle. The reason is that I'd argue your problem is a rare edge case and only allowing a single text String makes other features possible, like more efficient child generation, pausing every round trip as well as smooth acceleration and deceleration. |
And yes, it scrolled fast because of the timer. It doesn't run in the background but because of the isochronousy of the timer, all the events are fired at once when the app resumes. Here's an issue about it dart-lang/sdk#23487 but it seems like it won't be changed any time soon. I'll try to address this problem in the next version by making the scrolling asynchronous and using Future.doWhile() |
@manondidi However, as I explained above, my goal for this widget is to take as much work of most developers' mind as possible, so I made tradeoffs in comprehensiveness and functionality vs generalization, leaving edge cases like your unsatisfied. Marcel |
Marquee(
child: Text('There once was a boy who told this story about a boy: "'),
)
i want marquee every time show some diffent thing not same thing?
such as ["aaa" ,"bbb","ccc"]
first time show Text("aaa");
second time show Text("bbb");
thrid time show Text("ccc");
i am not good at english ,thx
The text was updated successfully, but these errors were encountered: