Skip to content

Commit 9e7e206

Browse files
committed
docs(shared): update ThrottledFetchingService documentation
- Improved the class documentation to provide a clearer and more concise description - Refocused the explanation on the service's core functionality - Removed specific Flutter widget references to broaden applicability
1 parent 13ac919 commit 9e7e206

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

lib/shared/services/throttled_fetching_service.dart

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,16 @@ import 'package:core/core.dart';
44
import 'package:data_repository/data_repository.dart';
55

66
/// {@template throttled_fetching_service}
7-
/// A service that provides a robust mechanism for fetching all items from a
8-
/// paginated data source.
7+
/// A service that provides a robust and efficient mechanism for fetching all
8+
/// items from a paginated data source.
99
///
10-
/// The DropdownButtonFormField widget in Flutter does not natively support
11-
/// on-scroll pagination. To ensure a good user experience and preserve UI
12-
/// consistency, it's often necessary to load the entire list of options
13-
/// upfront. However, fetching all pages sequentially can be slow, and fetching
14-
/// all pages in parallel can overwhelm the server.
10+
/// In scenarios where an entire dataset is needed upfront (e.g., for populating
11+
/// dropdowns, client-side searching, or when UI components don't support
12+
/// on-scroll pagination), this service offers an optimized solution.
1513
///
16-
/// This service solves that problem by implementing a throttled, parallel
17-
/// fetching strategy. It fetches data in controlled, concurrent batches,
18-
/// providing a significant performance improvement over sequential fetching
19-
/// while remaining respectful of server resources.
14+
/// It fetches all pages from a repository, providing a significant performance
15+
/// improvement over fetching pages one by one, while avoiding the risk of
16+
/// overwhelming the server by fetching all pages at once.
2017
/// {@endtemplate}
2118
class ThrottledFetchingService {
2219
/// {@macro throttled_fetching_service}

0 commit comments

Comments
 (0)