EQLazyStackController constructor

EQLazyStackController({
  1. int initialIndex = 0,
  2. List<int> preloadIndexes = const [],
  3. bool disposeUnused = false,
  4. int maxCachedPages = 3,
  5. List<int> removableIndexes = const [],
  6. bool isListenMemoryPressure = false,
})

Implementation

EQLazyStackController({
  int initialIndex = 0,
  this.preloadIndexes = const [],
  this.disposeUnused = false,
  this.maxCachedPages = 3,
  this.removableIndexes = const [],
  this.isListenMemoryPressure = false,
}) : _currentIndex = initialIndex {
  _markAsUsed(initialIndex);
  for (final index in preloadIndexes) {
    _markAsUsed(index);
  }

  if (isListenMemoryPressure) {
    WidgetsBinding.instance.addObserver(this);
  }
}