lazy_indexed_stack_plus 0.0.1 copy "lazy_indexed_stack_plus: ^0.0.1" to clipboard
lazy_indexed_stack_plus: ^0.0.1 copied to clipboard

The ultimate enhanced IndexedStack with lazy loading, preloading, and state preservation made easy for optimized Flutter apps.

The ultimate enhanced IndexedStack with lazy loading, preloading, and state preservation made easy for optimized Flutter apps.

Features #

  • πŸš€ Lazy Loading: Children are only built when they first become active.
  • ⚑ Preloading: Specify indexes to load in the background before the user navigates to them.
  • πŸ’Ύ State Preservation: Keeps the state of children alive (scroll position, text inputs, etc.) once loaded.
  • πŸ› οΈ Custom Placeholders: Show a custom widget (like a loader) for uninitialized tabs.
  • πŸ”„ Placeholder Sync: Automatically updates placeholders across all tabs if the placeholder widget changes.

Getting started #

Add the dependency to your pubspec.yaml:

dependencies:
  lazy_indexed_stack_plus: ^0.0.1

Usage #

LazyIndexedStackPlus(
  index: 0,
  preloadIndexes: {1}, // Optional: Preload specific tabs
  placeholder: Center(child: CircularProgressIndicator()),
  children: [
    HomeTab(),
    ProfileTab(),
    SettingsTab(),
  ],
);
3
likes
140
points
74
downloads

Publisher

unverified uploader

Weekly Downloads

The ultimate enhanced IndexedStack with lazy loading, preloading, and state preservation made easy for optimized Flutter apps.

Repository (GitHub)
View/report issues

Topics

#lazy-loading #widget #state-management #performance #indexed-stack

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on lazy_indexed_stack_plus