[中文文档]
-
Add marquee_text as a dependency in your pubspec.yaml file.
dependencies: marquee_text: ^1.1.0
-
Now in your flutter project, you can use:
Container( width: 100, color: Colors.green child: MarqueeText( text: 'Don not worry when you are not recognized', style: TextStyle( fontSize: 24, color: Colors.white, ), speed: 30, ), )
Property | Type | Required | Default |
---|---|---|---|
text | String | true | / |
style | TextStyle | false | / |
speed | double | false | 50 |
alwaysScroll | bool | false | false |
textDirection | TextDirection | false | TextDirection.ltr |
marqueeDirection | MarqueeDirection | false | MarqueeDirection.rtl |