1

I want create text with always auto scroll(like label .continuous property in swift). Now I am using SingleChildScrollView with scrollController

SchedulerBinding.instance.addPostFrameCallback((_) { _scrollController.animateTo(_scrollController.position.maxScrollExtent, duration: Duration(seconds: 3), curve: Curves.easeIn); });

esfsef
  • 193
  • 3
  • 11

1 Answers1

1

You need to use the Marquee property for auto move text in flutter , for it there is library to do so please check it once Marquee library

And please check the code for it

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),
  startPadding: 10.0,
  accelerationDuration: Duration(seconds: 1),
  accelerationCurve: Curves.linear,
  decelerationDuration: Duration(milliseconds: 500),
  decelerationCurve: Curves.easeOut,
)
Ravindra Kushwaha
  • 7,846
  • 14
  • 53
  • 103