adaptive_listview

A lightweight and adaptive Flutter list widget that automatically adjusts the number of visible items based on available height.

Features

  • Automatically calculates and displays only the items that fit in the given height.
  • Shows a built-in “+X more” indicator for overflowing items.
  • Supports customizable padding, font size, and separator spacing.
  • Uses a non-scrollable, lightweight ListView for predictable layout behavior.

Getting started

To use this package, add adaptive_listview as a dependency in your pubspec.yaml file.

Usage

Minimal example:

    AdaptiveListView(items: List.generate(10, (index)=>'Item $index'))

Custom settings:

   AdaptiveListView(
        items: List.generate(10, (index) => 'Item $index'),
        padding: EdgeInsets.all(4),
        eventTextFontSize: 12,
        moreEventsIndicatorfontSize: 12,
        tileBorderWidth: 2,
        columnSpacing: 4,
        separatorHeight: 4,
      ),