INNER CODE UNIT · Dart

deltaBottom

rvamsikrishna/inview_notifier_list · lib/src/inview_state.dart:83

      final double deltaBottom = deltaTop +
          (_scrollDirection == Axis.vertical ? size.height : size.width);
      bool isInViewport = false;

      //Check if the item is in the viewport by evaluating the provided widget's isInViewPortCondition condition.
      isInViewport = _isInViewCondition!(deltaTop, deltaBottom, vpHeight);

      if (isInViewport) {
        //prevent changing the value on every scroll if its already the same
        if (!_currentInViewIds.contains(item.id)) {
          _currentInViewIds.add(item.id);
          notifyListeners();
        }
      } else {
        if (_currentInViewIds.contains(item.id)) {
          _currentInViewIds.remove(item.id);
          notifyListeners();
        }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…