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

DisposableLazyIndexedStack is a Flutter widget that shows only the active child, lazily builds it, and disposes previous children. Perfect for memory-efficient tabs and navigation flows.

DisposableLazyIndexedStack #

A lightweight Flutter widget that works like an IndexedStack, but with two important differences:

Lazy building → Children are only built when needed.
Disposable children → Previous widgets are fully disposed when replaced.

This makes it ideal for tab navigation or page switching scenarios where you don’t want to keep all screens in memory.


✨ Features #

  • 🚀 Lazily builds only the current child.
  • 🗑️ Disposes previous child widgets when index changes.
  • 🎯 Keeps memory usage low (unlike IndexedStack, which keeps all children alive).
  • 🔄 Perfect for tab views, navigation flows, or conditional screens.

📦 Installation #

Add this to your pubspec.yaml:

dependencies:
  disposable_lazy_indexed_stack: ^1.0.0
1
likes
135
points
25
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

DisposableLazyIndexedStack is a Flutter widget that shows only the active child, lazily builds it, and disposes previous children. Perfect for memory-efficient tabs and navigation flows.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on disposable_lazy_indexed_stack