text_marquee 0.0.2

SDKflutter
Platformandroidioswindowslinuxmacosweb

Text marquee is a widget for Flutter that scrolls text infinitely. You can customize the direction, style, and animation of the text.

Text marquee

Open source flutter package, Text marquee for flutter apps.

Getting Started

Installing

Add this line to the pubspec.yaml file below the dependencies:

dependencies:
  text_marquee: ^0.0.2

Now to use, import this package into the desired file as follows:

import 'package:text_marquee/text_marquee.dart';

Basic example

Here is simple example you can use to create with this package:

Loading basic_example.gif ... [6.35MB]
TextMarquee(
  '"Stay close to anything that makes you glad you are alive." -Hafez',
  spaceSize: 72,
  style: const TextStyle(
    color: Colors.white,
    fontWeight: FontWeight.w600,
    fontSize: 24
  ),
)

If you want to use languages whose letters are arranged from right to left (such as Persian), you must set the rtl value equal to true:

TextMarquee(
  'به هر چیزی که شما را از اینکه زنده هستید، خوشحال می کند، نزدیک باشید." -حافظ"',
  spaceSize: 72,
  rtl: true,
  style: const TextStyle(
    color: Colors.white,
    fontWeight: FontWeight.w600,
    fontSize: 24
  ),
)

Parameters description

ParameterDefaultDescription
text
String
Text to be scrolled.
style
TextStyle
TextStyle()Text style.
duration
Duration?
nullAnimation duration.
curve
Curve
Curves.linearAnimation curve.
delay
Duration
Duration(seconds: 2)Delay time for scrolling start.
spaceSize
double
32The distance between the original text and its subsequent repetition.
startPaddingSize
double
0Text spacing from the beginning of the widget.
rtl
bool
falseIf the text is arranged from the right, it should have a value of True.