I am building a radio app. Like in Spotify, there is a bar with the current title and artist, the text should be in one line and in a given width. How can I let the text move from right to left and back?

When using a self-made animation, I want to have a fixed speed of the moving text, so I need the time and the width of the text widget.

Is there a package/built-in option to do this? Or do I have to use a self-made animation? If so, how can I get the text widget width?

Controller and animation:

AnimationController(duration: Duration(seconds: 10), vsync: this); animation = Tween<double>(begin: 0, end: 1) .animate(CurvedAnimation(parent: _controller, curve: Curves.linear)); animation.addListener(() { setState(() {}); }); _controller.repeat();

build method