INNER CODE UNIT · Dart

_InViewNotifierState

rvamsikrishna/inview_notifier_list · lib/src/inview_notifier.dart:56

class _InViewNotifierState extends State<InViewNotifier> {
  InViewState? _inViewState;
  StreamController<ScrollNotification>? _streamController;

  @override
  void initState() {
    super.initState();
    _initializeInViewState();
    _startListening();
  }

  @override
  void didUpdateWidget(InViewNotifier oldWidget) {
    if (oldWidget.throttleDuration != widget.throttleDuration) {
      //when throttle duration changes, close the existing stream controller if exists
      //and start listening to a stream that is throttled by new duration.
      _streamController?.close();
      _startListening();

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…