flutter_infinite_marquee 2.0.1 copy "flutter_infinite_marquee: ^2.0.1" to clipboard
flutter_infinite_marquee: ^2.0.1 copied to clipboard

Frame-driven, lifecycle-aware marquee with unified speed control and interaction.

flutter_infinite_marquee #

中文文档

Frame-driven, lifecycle-aware marquee with unified speed control. Smooth automatic scrolling of looping text or widgets with click/drag interaction support.

Installation #

To use this package, add flutter_infinite_marquee as a dependency in the pubspec.yaml file.

dependencies:
  flutter_infinite_marquee: last_version

Usage #

Import the package in your Dart file.

import 'package:flutter_infinite_marquee/flutter_infinite_marquee.dart';
SizedBox(
  height: 50,
  child: InfiniteMarquee(
    speed: 60, // pixels per second; negative for reverse
    itemBuilder: (BuildContext context, int index) {
      return Text('Hello, world! $index');
    },
    separatorBuilder: (context, index) => const SizedBox(width: 12),
  ),
)

Parameters #

  • speed: logical pixels per second (double, required). Negative scrolls in reverse.
  • autoplay: start automatically (default true).
  • controller: MarqueeController for play(), pause(), setSpeed().
  • scrollDirection: Axis.horizontal or Axis.vertical.
  • itemBuilder: builder for item at index.
  • separatorBuilder: optional builder between items.
  • itemCount: optional finite items; null means unbounded.
  • itemExtent: optional fixed extent to improve performance.
  • physics, padding, initialScrollOffset.

Sample diagram #

sample_diagram.gif

If you encounter any problems or have suggestions, please create an issue on GitHub issues. Thank you for using!

15
likes
160
points
3.56k
downloads

Publisher

unverified uploader

Weekly Downloads

Frame-driven, lifecycle-aware marquee with unified speed control and interaction.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on flutter_infinite_marquee