{"id":15008381,"url":"https://github.com/dariomatias-dev/scroll_infinity","last_synced_at":"2026-03-02T14:32:37.191Z","repository":{"id":245703657,"uuid":"818208019","full_name":"dariomatias-dev/scroll_infinity","owner":"dariomatias-dev","description":"Add infinite scrolling to your Flutter lists quickly and easily, with simple and fast implementation.","archived":false,"fork":false,"pushed_at":"2025-07-27T20:59:08.000Z","size":396,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-27T22:25:56.851Z","etag":null,"topics":["dart","dartlang","flutter","flutter-package","mit","mit-license","package","pubdev"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dariomatias-dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-21T10:32:17.000Z","updated_at":"2025-07-27T20:59:14.000Z","dependencies_parsed_at":"2024-08-22T22:24:53.587Z","dependency_job_id":"8a7926ca-e7ed-4d4e-be7b-db63a0b231ea","html_url":"https://github.com/dariomatias-dev/scroll_infinity","commit_stats":null,"previous_names":["dariomatias-dev/scroll_infinity"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/dariomatias-dev/scroll_infinity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dariomatias-dev%2Fscroll_infinity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dariomatias-dev%2Fscroll_infinity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dariomatias-dev%2Fscroll_infinity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dariomatias-dev%2Fscroll_infinity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dariomatias-dev","download_url":"https://codeload.github.com/dariomatias-dev/scroll_infinity/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dariomatias-dev%2Fscroll_infinity/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30006319,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T14:08:50.421Z","status":"ssl_error","status_checked_at":"2026-03-02T14:08:50.037Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dart","dartlang","flutter","flutter-package","mit","mit-license","package","pubdev"],"created_at":"2024-09-24T19:18:06.468Z","updated_at":"2026-03-02T14:32:37.185Z","avatar_url":"https://github.com/dariomatias-dev.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cbr\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Flutter-02569B?style=for-the-badge\u0026logo=flutter\u0026logoColor=white\" alt=\"Flutter\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Dart-0175C2?style=for-the-badge\u0026logo=dart\u0026logoColor=white\" alt=\"Dart\"\u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\n\u003ch1 align=\"center\"\u003eScroll Infinity\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  A Flutter widget that provides an infinite scrollable list with built-in support for paginated data loading, state handling, and flexible customization.\n  \u003cbr\u003e\n  \u003ca href=\"#about-the-project\"\u003e\u003cstrong\u003eExplore the docs »\u003c/strong\u003e\u003c/a\u003e\n  \u003cbr\u003e\u003cbr\u003e\n  \u003ca href=\"https://pub.dev/packages/scroll_infinity\"\u003eView on pub.dev\u003c/a\u003e\n  ·\n  \u003ca href=\"https://github.com/dariomatias-dev/scroll_infinity/issues\"\u003eReport Bug\u003c/a\u003e\n  ·\n  \u003ca href=\"https://github.com/dariomatias-dev/scroll_infinity/issues\"\u003eRequest Feature\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/pub/v/scroll_infinity.svg\"\u003e\n  \u003cimg src=\"https://img.shields.io/pub/likes/scroll_infinity\"\u003e\n  \u003cimg src=\"https://img.shields.io/pub/points/scroll_infinity\"\u003e\n  \u003cimg src=\"https://img.shields.io/pub/popularity/scroll_infinity\"\u003e\n\u003c/div\u003e\n\n## Table of Contents\n\n- [About The Project](#about-the-project)\n- [Features](#features)\n- [Built With](#built-with)\n- [Getting Started](#getting-started)\n- [Usage](#usage)\n  - [Basic Vertical Scroll](#basic-vertical-scroll)\n  - [Basic Horizontal Scroll](#basic-horizontal-scroll)\n  - [Vertical Scroll with Interval](#vertical-scroll-with-interval)\n- [Properties](#properties)\n- [Contributing](#contributing)\n- [License](#license)\n- [Author](#author)\n\n## About The Project\n\nScrollInfinity simplifies implementing infinite scroll lists in Flutter. It handles paginated loading, state management (loading, empty, error), and user interactions, letting developers focus on building item UIs.\n\nIt offers customization for manual/automatic loading, custom state widgets, and both vertical and horizontal layouts.\n\n### Development Environment\n\n| Tool        | Version Used |\n| ----------- | ------------ |\n| Flutter SDK | 3.32.7       |\n| Dart SDK    | 3.8.1        |\n\n## Features\n\n- Infinite scroll with pagination\n- Manual or automatic data loading\n- Custom \"Load More\" and \"Try Again\" builders\n- Loading, error, and empty states handling\n- Optional scrollbars, header widget, and separators\n- Vertical and horizontal scrolling support\n- Initial items support\n- Insert null values at intervals (ads/dividers)\n- Retry attempts limit on error\n- Real item index mapping with intervals\n\n## Built With\n\n- **[Flutter](https://flutter.dev/)** – A UI toolkit by Google for building beautiful, natively compiled applications for mobile, web, and desktop from a single codebase.  \n- **[Dart](https://dart.dev/)** – The programming language used for Flutter, optimized for building fast apps on any platform.\n\n## Getting Started\n\nInstall:\n\n```bash\nflutter pub add scroll_infinity\n```\n\n## Usage\n\nPagination requests a new page when the user reaches the list end.\nIf `loadData` returns `null`, the error state is shown.\n\n**Note:** Use a nullable type `T?` when using `interval`, as null values are inserted.\n\n### Basic Vertical Scroll\n\n```dart\n\nimport 'package:flutter/material.dart';\nimport 'package:scroll_infinity/scroll_infinity.dart';\n\nvoid main() {\n  runApp(\n    const MaterialApp(\n      debugShowCheckedModeBanner: false,\n      home: MyApp(),\n    ),\n  );\n}\n\nclass MyApp extends StatefulWidget {\n  const MyApp({super.key});\n\n  @override\n  State\u003cMyApp\u003e createState() =\u003e _MyAppState();\n}\n\nclass _MyAppState extends State\u003cMyApp\u003e {\n  static const _maxItems = 20;\n\n  @override\n  Widget build(BuildContext context) {\n    return Scaffold(\n      body: SafeArea(\n        child: ScrollInfinity\u003cint\u003e(\n          maxItems: _maxItems,\n          loadData: (page) async {\n            await Future.delayed(const Duration(seconds: 2));\n\n            return List.generate(\n              _maxItems,\n              (index) =\u003e page * _maxItems + index + 1,\n            );\n          },\n          itemBuilder: (value, index) {\n            return ListTile(\n              title: Text('Item $value'),\n              subtitle: Text('Subtitle $value'),\n            );\n          },\n        ),\n      ),\n    );\n  }\n}\n```\n\n### Basic Horizontal Scroll\n\n```dart\n\nimport 'package:flutter/material.dart';\nimport 'package:scroll_infinity/scroll_infinity.dart';\n\nvoid main() {\n  runApp(\n    const MaterialApp(\n      debugShowCheckedModeBanner: false,\n      home: MyApp(),\n    ),\n  );\n}\n\nclass MyApp extends StatefulWidget {\n  const MyApp({super.key});\n\n  @override\n  State\u003cMyApp\u003e createState() =\u003e _MyAppState();\n}\n\nclass _MyAppState extends State\u003cMyApp\u003e {\n  static const _maxItems = 10;\n\n  @override\n  Widget build(BuildContext context) {\n    return Scaffold(\n      body: Center(\n        child: SizedBox(\n          height: 100.0,\n          child: ScrollInfinity\u003cint\u003e(\n            scrollDirection: Axis.horizontal,\n            maxItems: _maxItems,\n            loadData: (page) async {\n              await Future.delayed(const Duration(seconds: 2));\n\n              return List.generate(\n                _maxItems,\n                (index) =\u003e page * _maxItems + index + 1,\n              );\n            },\n            itemBuilder: (value, index) {\n              return Center(\n                child: Padding(\n                  padding: const EdgeInsets.all(8.0),\n                  child: Text('Item $value'),\n                ),\n              );\n            },\n          ),\n        ),\n      ),\n    );\n  }\n}\n```\n\n### Vertical Scroll with Interval\n\n```dart\n\nimport 'package:flutter/material.dart';\nimport 'package:scroll_infinity/scroll_infinity.dart';\n\nvoid main() {\n  runApp(\n    const MaterialApp(\n      debugShowCheckedModeBanner: false,\n      home: MyApp(),\n    ),\n  );\n}\n\nclass MyApp extends StatefulWidget {\n  const MyApp({super.key});\n\n  @override\n  State\u003cMyApp\u003e createState() =\u003e _MyAppState();\n}\n\nclass _MyAppState extends State\u003cMyApp\u003e {\n  static const _maxItems = 20;\n\n  @override\n  Widget build(BuildContext context) {\n    return Scaffold(\n      body: SafeArea(\n        child: ScrollInfinity\u003cint?\u003e(\n          maxItems: _maxItems,\n          interval: 2,\n          loadData: (page) async {\n            await Future.delayed(const Duration(seconds: 2));\n\n            return List.generate(\n              _maxItems,\n              (index) =\u003e page * _maxItems + index + 1,\n            );\n          },\n          itemBuilder: (value, index) {\n            if (value == null) return const Divider();\n\n            return ListTile(\n              title: Text('Item $value'),\n            );\n          },\n        ),\n      ),\n    );\n  }\n}\n```\n\n## Properties\n\n**Core Data Handling**\n\n| Name             | Type                                  | Default | Description              |\n| ---------------- | ------------------------------------- | ------- | ------------------------ |\n| loadData         | `Future\u003cList\u003cT\u003e?\u003e Function(int)`      | –       | Fetch data for each page |\n| itemBuilder      | `Widget Function(T value, int index)` | –       | Builds each item         |\n| maxItems         | `int`                                 | –       | Max items per request    |\n| initialItems     | `List\u003cT\u003e?`                            | null    | Items before first fetch |\n| initialPageIndex | `int`                                 | 0       | Starting page index      |\n\n**Layout \u0026 Appearance**\n\n| Name             | Type                                  | Default  | Description      |\n| ---------------- | ------------------------------------- | -------- | ---------------- |\n| scrollDirection  | `Axis`                                | vertical | Scroll direction |\n| padding          | `EdgeInsetsGeometry?`                 | null     | Internal padding |\n| header           | `Widget?`                             | null     | Header widget    |\n| separatorBuilder | `Widget Function(BuildContext, int)?` | null     | Separators       |\n| scrollbars       | `bool`                                | true     | Show scrollbars  |\n\n**Behavioral Features**\n\n| Name             | Type   | Default | Description                  |\n| ---------------- | ------ | ------- | ---------------------------- |\n| interval         | `int?` | null    | Null item insertion interval |\n| useRealItemIndex | `bool` | true    | Independent indexing         |\n| automaticLoading | `bool` | true    | Auto-fetch on scroll         |\n\n**Error Handling**\n\n| Name               | Type   | Default | Description |\n| ------------------ | ------ | ------- | ----------- |\n| enableRetryOnError | `bool` | true    | Allow retry |\n| maxRetries         | `int?` | null    | Retry limit |\n\n**State-Specific Widgets**\n\n| Name              | Type                             | Default | Description                |\n| ----------------- | -------------------------------- | ------- | -------------------------- |\n| loading           | `Widget?`                        | null    | Loading state widget       |\n| empty             | `Widget?`                        | null    | Empty state widget         |\n| tryAgainBuilder   | `Widget Function(VoidCallback)?` | null    | \"Try Again\" widget         |\n| loadMoreBuilder   | `Widget Function(VoidCallback)?` | null    | \"Load More\" widget         |\n| retryLimitReached | `Widget?`                        | null    | Retry limit reached widget |\n\n## Contributing\n\n1. Fork the project\n2. Create a feature branch:\n\n   ```bash\n   git checkout -b feature/AmazingFeature\n   ```\n\n3. Commit changes:\n\n   ```bash\n   git commit -m 'Add some AmazingFeature'\n   ```\n\n4. Push to branch:\n\n   ```bash\n   git push origin feature/AmazingFeature\n   ```\n\n5. Open a Pull Request\n\n## License\n\nDistributed under the MIT License. See the [LICENSE](LICENSE) file for more information.\n\n## Author\n\nDeveloped by **Dário Matias**:\n\n- **Portfolio**: [dariomatias-dev](https://dariomatias-dev.com)\n- **GitHub**: [dariomatias-dev](https://github.com/dariomatias-dev)\n- **Email**: [matiasdario75@gmail.com](mailto:matiasdario75@gmail.com)\n- **Instagram**: [@dariomatias_dev](https://instagram.com/dariomatias_dev)\n- **LinkedIn**: [linkedin.com/in/dariomatias-dev](https://linkedin.com/in/dariomatias-dev)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdariomatias-dev%2Fscroll_infinity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdariomatias-dev%2Fscroll_infinity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdariomatias-dev%2Fscroll_infinity/lists"}