๐ README.md
# ๐ฆ flexible_data_view
A powerful and customizable Flutter widget for displaying data in multiple flexible formats including **ListView**, **GridView**, **Slideshow (PageView)**, and **TableView**. Easily switch between views, customize each card, scroll direction, and even enable auto-slideshow with no external dependencies like `carousel_slider`.
---
## โจ Features
- โ
List, Grid, Slideshow (PageView), and Table support
- ๐จ Customizable card widget using `itemBuilder`
- ๐ Auto-slideshow with configurable interval
- โ๏ธ Vertical or horizontal scroll direction
- ๐ Grid cross-axis customization
- ๐ Table layout with headers and rows
- ๐งฑ Lightweight and no third-party dependencies
---
## ๐ Getting Started
Add the dependency in your `pubspec.yaml`:
```yaml
dependencies:
flexible_data_view: ^1.0.0
๐งฉ Usage
Import
import 'package:flexible_data_view/flexible_data_view.dart';
๐ก Example
FlexibleDataView<String>(
data: ['Apple', 'Banana', 'Cherry'],
viewType: ViewType.grid,
gridCrossAxisCount: 2,
scrollDirection: Axis.vertical,
autoSlide: true,
slideInterval: const Duration(seconds: 3),
itemBuilder: (item, index) => Card(
child: Center(
child: Text(item),
),
),
)
๐ ViewType Options
enum ViewType {
list,
grid,
slideshow,
table,
}
๐ Table Example
FlexibleTableView(
headers: ['Name', 'Age'],
rows: [
['Alice', '25'],
['Bob', '30'],
],
)
๐ธ Screenshots
List View | Grid View | Slideshow | Table |
---|---|---|---|
โ | โ | โ | โ |
๐ Example Project
Check the full example in the example folder or run:
cd example
flutter run
๐งช Run Tests
flutter test
๐ผ Maintainer
Developed & maintained by Md.Rahul Reza ๐ซ For any inquiries, issues, or feature requests, please contact via website.