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

A Flutter widget that builds only the active child and disposes the previous ones — ideal for memory-efficient tabs and navigation.

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
160
points
25
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A Flutter widget that builds only the active child and disposes the previous ones — ideal for memory-efficient tabs and navigation.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on disposable_lazy_indexed_stack