• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Duit-Foundation / flutter_duit / 21026233449

15 Jan 2026 09:26AM UTC coverage: 80.184% (-8.3%) from 88.441%
21026233449

push

github

web-flow
feat: Capability-based API migration pt2 (#323)

162 of 408 new or added lines in 23 files covered. (39.71%)

328 existing lines in 17 files now uncovered.

4354 of 5430 relevant lines covered (80.18%)

34.33 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

73.68
/lib/src/utils/scroll_utils.dart
1
import "package:flutter/material.dart";
2
import "package:flutter_duit/flutter_duit.dart";
3

4
mixin ScrollUtils<T extends StatefulWidget> on State<T> {
5
  //<editor-fold desc="Properties and getters">
6
  late final ScrollController _scrollController;
7
  bool _isExecuting = false;
8

9
  /// Indicates if the list is at the end of list
10
  bool _isEOL = false;
11
  late UIElementController _controller;
12

13
  ScrollController get scrollController => _scrollController;
16✔
14

15
  set isEOL(bool value) => _isEOL = value;
40✔
16

17
  //</editor-fold>
18

19
  //<editor-fold desc="Lifecycle methods">
20
  @override
20✔
21
  void dispose() {
22
    _scrollController.dispose();
40✔
23
    super.dispose();
20✔
24
  }
25

26
  //</editor-fold>
27

28
  //<editor-fold desc="Methods">
29
  void attachOnScrollCallback(UIElementController controller) {
20✔
30
    _controller = controller;
20✔
31
    final attrs = _controller.attributes.payload;
60✔
32
    final extent = attrs.tryGetDouble(
20✔
33
      key: "scrollEndReachedThreshold",
34
      defaultValue: 300,
35
    )!;
36
    _scrollController = ScrollController()
40✔
37
      ..addListener(
20✔
38
        () async {
8✔
39
          if (_scrollController.position.maxScrollExtent -
32✔
40
                  _scrollController.offset <=
24✔
41
              extent) {
UNCOV
42
            if (!_isExecuting && !_isEOL) {
×
UNCOV
43
              _isExecuting = true;
×
UNCOV
44
              await _controller.performRelatedActionAsync();
×
UNCOV
45
              _isEOL = true;
×
UNCOV
46
              _isExecuting = false;
×
47
            }
48
          }
49
        },
50
      );
51
  }
52

53
//</editor-fold>
54
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc