horizontal_list_view 1.0.1 copy "horizontal_list_view: ^1.0.1" to clipboard
horizontal_list_view: ^1.0.1 copied to clipboard

Flutter horizontal list view with fixed crossAxisCount.

horizontal_list_view Pub #

Flutter horizontal list view with fixed crossAxisCount.

Preview example

Installing #

Add to pubspec.yaml file

dependencies:
  horizontal_list_view: ^1.0.0

import

import 'package:horizontal_list_view/horizontal_list_view.dart';

Usage #

Code example #

import 'package:horizontal_list_view/horizontal_list_view.dart';

HorizontalListView(
    crossAxisCount: 3, // Number of items displayed per row.
    crossAxisSpacing: 16, // Spacing between items in the same row.
    controller: HorizontalListViewController(), // Optional scroll controller.
    itemCount: 10, // Total number of items in the list.
    itemBuilder: (BuildContext context, int index) {
        // Create and return the widgets for each item.
        return AspectRatio(
            aspectRatio: 16 / 9,
            child: Container(
                color: Colors.red,
                child: Center(
                    child: Text('item: $index'),
                ),
            ),
        );
    },
)
8
likes
0
points
57
downloads

Publisher

verified publisherflameark.com

Weekly Downloads

Flutter horizontal list view with fixed crossAxisCount.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on horizontal_list_view