scrolling_text 0.0.2 copy "scrolling_text: ^0.0.2" to clipboard
scrolling_text: ^0.0.2 copied to clipboard

outdated

This package is a Text ticker that helps to make vertical or horizontal scrolling text with custom callback, speed and style .

scrolling_text #

This package can be used to make a scrolling text widget(marquee) same as shown on bottom of the news channel.

Features #

custom text style start and ending offset for text you can have callback function on the end of any text scrolling controlled speed with speed and rest parameters vertical or horizontal scroll direction

Usage #

Add this Project to Pubspec and import as

import 'package:scrolling_text/scrolling_text.dart';

You can use as this to play multiple text in marquee

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        title: 'Scrolling Text Demo',
        theme: ThemeData(
          primarySwatch: Colors.blue,
        ),
        home: Scaffold(
          body: Center(
            child: Container(
              width: 30,
              color: const Color.fromARGB(255, 128, 184, 230),
              padding: const EdgeInsets.all(10),
              child: ScrollingText(
                text: news[index],
                scrollAxis: Axis.vertical,
                onFinish: () {
                  if (index < news.length) {
                    index++;
                  } else {
                    index = 0;
                  }
                  setState(() {});
                },
              ),
            ),
          ),
        ));
  }
}

int index = 0;
List<String> news = [
  'Lorem ipsum is a placeholder text commonly used to demonstrate the visual form of a document or a typeface without relying on meaningful content',
  'Lorem Ipsum is simply dummy text of the printing and typesetting industry',
  'It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using  making it look like readable English.'
];

Basic Results #

Horizontal Example:

Vertical Example

15
likes
0
points
30
downloads

Publisher

verified publisheraakashghimire.com.np

Weekly Downloads

This package is a Text ticker that helps to make vertical or horizontal scrolling text with custom callback, speed and style .

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on scrolling_text