smart_layout_switcher 1.0.0 copy "smart_layout_switcher: ^1.0.0" to clipboard
smart_layout_switcher: ^1.0.0 copied to clipboard

A Flutter package that automatically switches between list, grid, masonry, and staggered layouts with smooth animations based on screen size.

Smart Layout Switcher for Flutter #

Pub Version License: MIT

A revolutionary Flutter package that automatically switches between list, grid, masonry, and staggered layouts with smooth animations based on screen size.

Features #

  • 🚀 Automatic layout switching based on screen size
  • 🎨 Smooth animated transitions between layouts
  • ⚙️ Fully customizable breakpoints
  • 📱 Responsive design made simple
  • 🏗 Zero-boilerplate implementation

Installation #

Add to your pubspec.yaml:

dependencies:
  smart_layout_switcher: ^1.0.0

Usage #

Basic implementation:

void main() {
  SmartLayoutSwitcher(
    children: List.generate(
      20,
          (index) => Card(child: Text('Item $index')),
    ),
  );
}

Custom configuration:

void main() {
  SmartLayoutSwitcher(
    children: myWidgets,
    listThreshold: 500,
    gridThreshold: 800,
    masonryThreshold: 1100,
    animationDuration: Duration(milliseconds: 500),
    gridCrossAxisCount: 3,
  );
}

Layout Thresholds #

Layout Default Threshold Description
List <600px Single column layout
Grid 600-900px Uniform grid layout
Masonry 900-1200px Pinterest-style masonry layout
Staggered >1200px Staggered grid with large items

License #

MIT

3
likes
160
points
10
downloads

Publisher

verified publisheranantyalabs.com

Weekly Downloads

A Flutter package that automatically switches between list, grid, masonry, and staggered layouts with smooth animations based on screen size.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_staggered_grid_view

More

Packages that depend on smart_layout_switcher