A Flutter package for auto-scrolling images. By integrating Auto Scroll Image, you gain the capability to effortlessly incorporate scrolling advertisements tailored to your app's content. This versatile feature enhances the visual appeal of your app and injects a dynamic and engaging element into its interface. Whether showcasing products, promotions, or captivating visuals related to your app's subject matter, Auto Scroll Image ensures a lively and interactive user experience. Moreover, it is compatible with iOS, Android, macOS, and web platforms, offering a seamless scrolling experience across a diverse range of devices, making your app stand out with vibrant and attention-grabbing content.
Features
- A Flutter package for auto-scrolling images.
- This package provides a widget for displaying a horizontal list of images that automatically scrolls.
- Users can customize the number of items, item width, and the duration of auto-scrolling.
- For web page take care of width of SizedBox to see image scrolling
Getting started
auto_scrolling_image
A view of the Package
make an assets folder in root of the project:
Example for adding auto_scroll_image to pubspec.yaml
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.6
auto_scroll_image: ^0.2.2-dev
assets:
- assets/
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^3.0.0
flutter:
uses-material-design: true
import :
import 'package:auto_scroll_image/auto_scroll_image.dart';
then add AutoScrollImage to your class:
home: Scaffold(
appBar: AppBar(
title: Text('Your App'),
),
body: const Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
// Your other widgets can go here
// Example usage of AutoScrollImage
AutoScrollImage(
itemCount: 10, // Customize itemCount
itemWidth: 50.0, // Customize itemWidth
autoScrollDuration: Duration(seconds: 2), // Customize autoScrollDuration
timerInterval: Duration(seconds: 2), // Customize timerInterval
),
// More of your widgets can follow here
],
),
),
final result would be on Android:
Android
iOS:
macOS:
Web:
## Usage You can take a look at example bellow and customise it with your needs;class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Auto Scroll Image'),
),
body: AutoScrollImage(
itemCount: 10, // Customize itemCount
itemWidth: 50.0, // Customize itemWidth
autoScrollDuration: Duration(seconds: 2), // Customize autoScrollDuration
timerInterval: Duration(seconds: 2), // Customize timerInterval
),
);
}
}
Additional information
This package facilitates seamless image scrolling on your screen, making it ideal for showcasing advertisements or demonstrating your app's capabilities. Enhance user engagement by effortlessly presenting a dynamic list of images with this easy-to-use solution,