Skip to content
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

The following assertion was thrown building Marquee(dirty, dependencies: [MediaQuery, _LocalizationsScope-[GlobalKey#85ab8], DefaultTextStyle, Directionality], state: _MarqueeState#ab262): #52

Open
AbdullahHanfy opened this issue Feb 14, 2021 · 1 comment

Comments

@AbdullahHanfy
Copy link

I am trying to use the widget marquee and this is the code :
Marquee(
text: 'Some sample text that takes some space.',
style: TextStyle(fontWeight: FontWeight.bold),
scrollAxis: Axis.horizontal,
crossAxisAlignment: CrossAxisAlignment.start,
blankSpace: 20.0,
velocity: 100.0,
pauseAfterRound: Duration(seconds: 1),
showFadingOnlyWhenScrolling: true,
fadingEdgeStartFraction: 0.1,
fadingEdgeEndFraction: 0.1,
numberOfRounds: 3,
startPadding: 10.0,
accelerationDuration: Duration(seconds: 1),
accelerationCurve: Curves.linear,
decelerationDuration: Duration(milliseconds: 500),
decelerationCurve: Curves.easeOut,
);
and this is the error : -
Acceleration and deceleration phase overlap. To fix this, try a combination of these approaches:

  • Make the text longer, so there's more room to animate within.
  • Shorten the accelerationDuration or decelerationDuration.
  • Decrease the velocity, so the duration to animate within is longer.
    'package:marquee/marquee.dart':
    Failed assertion: line 631 pos 9: '_linearDuration >= Duration.zero'
@jsonsuxing
Copy link

jsonsuxing commented Jan 25, 2024

Set the blankSpace value to non-0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants