{"id":32286050,"url":"https://github.com/jakky1/jk_fast_listview","last_synced_at":"2026-05-16T11:02:20.829Z","repository":{"id":205962659,"uuid":"715515080","full_name":"jakky1/jk_fast_listview","owner":"jakky1","description":"ListView / GridView for Flutter. Support fast scrolling among a large amount of data, flexible widget size, index-based scrolling, item recycler.","archived":false,"fork":false,"pushed_at":"2023-11-17T04:04:29.000Z","size":64,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-20T16:09:46.080Z","etag":null,"topics":["flutter","gridview","listview","listview-flutter"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jakky1.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-11-07T09:52:10.000Z","updated_at":"2025-08-31T02:10:40.000Z","dependencies_parsed_at":"2023-11-16T16:46:02.228Z","dependency_job_id":null,"html_url":"https://github.com/jakky1/jk_fast_listview","commit_stats":null,"previous_names":["jakky1/jk_fast_listview"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jakky1/jk_fast_listview","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakky1%2Fjk_fast_listview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakky1%2Fjk_fast_listview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakky1%2Fjk_fast_listview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakky1%2Fjk_fast_listview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jakky1","download_url":"https://codeload.github.com/jakky1/jk_fast_listview/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakky1%2Fjk_fast_listview/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33100319,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["flutter","gridview","listview","listview-flutter"],"created_at":"2025-10-23T01:55:26.741Z","updated_at":"2026-05-16T11:02:20.823Z","avatar_url":"https://github.com/jakky1.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JkFastListView\n\nListView / GridView for Flutter. Support fast scrolling among a large amount of data, flexible widget size, index-based scrolling, item recycler.\n\n## Features\n\n- Most API are the same with official flutter's ListView / GridView.\n- Fast scrolling among a large amount of data.\n- Flexible widget size.\n- scroll to item with specified index.\n- Listen to index of current first visible item.\n- Item recycler.\n\n## Who need this package?\n\n- If all the items has the same width \u0026 height, please use official flutter [ListView][1] and [GridView][2]. Both classes work well with fixed-size items, also support fast scrolling among a large amount of data in this case.\n- If the width \u0026 height of items are variable, and you need to fast jump to far-far-away item (by call jumpToIndex / animateToIndex, or drag scrollbar by user), please use this package. This is useful for some applications (ex. chat app).\n\n# Quick Start\n\n## Installation\n\nAdd this to your package's `pubspec.yaml` file:\n\n```yaml\ndependencies:\n  jk_fast_listview: ^0.8.0\n```\n\n# Usage\n\n## Build a ListView\n\nNOTE: name of most of the params are the same with official flutter's [ListView][1] and [GridView][2]. We don't explain each params here again.\n\n```\nvar listview = JkFastListView(\n  itemCount: 999999,\n  itemBuilder: (context, index) =\u003e Text(\"Item $index\"),\n\n  // optional, cannot be used in grid type\n  separatorBuilder: (context, index) =\u003e const Divider(), // optional\n);\n```\n\n## Build a GridView\n\n```\nvar listview = JkFastListView(\n  itemCount: 999999,\n  itemBuilder: (context, index) =\u003e Text(\"Item $index\"),\n\n  crossAxisCount: 3, // add this line to make 3 items per row\n\n  // another way to specify item count per row, cannot use with 'crossAxisCount'\n  // maxCrossAxisExtent: 300,\n\n  mainAxisSpacing: 20,  // optional\n  crossAxisSpacing: 20, // optional\n);\n```\n\n## other common optional params\n\nThe definition of these following parameters can be found in [ListView][1]\n\n```\nvar listview = JkFastListView(\n  ...\n  cacheExtent: 300,                 // optional\n  scrollDirection: Axis.horizontal, // optional\n  reverse: true,                    // optional\n);\n```\n\n## set initial item index\n\n```\nfinal itemController = JkItemController();\n\n// [optional] set which item should be visible from the beginning\n// initialIndex: index of item that should be visible from the beginning\n// alignment: null or 0~1 (double)\n//   null: not specified the position of item\n//   0: place the item at the beginning of listview\n//   1: place the item at the end of listview\n//   0.5: place the item at the center of listview\nitemController.setInitialIndex(initialIndex: 1000, alignment: 0.5);\n\nvar listview = JkFastListView(\n  ...\n  itemController: itemController,\n);\n```\n\n## scrollTo / animateTo item with specified index\n\n```\n// jump to item with index 1000\nitemController.jumpToIndex(1000, alignment: 1);\n\n// like 'jumpToIndex', but with animation\nitemController.animateToIndex(1000,\n  alignment: 1,\n  duration: const Duration(milliseconds: 300),\n  curve: Curves.easeIn);\n```\n\n## Listen to index of current first visible item\n\n```\nvar listview = JkFastListView(\n  ...\n  onScrollPosition: (index, ratio) {\n    log(\"first visible item index is $index\");\n    // ratio: 0~1 (double),\n    //   0: not visible,\n    //   1: totally visible,\n    //   0.5: only bottom-half of the item is visible\n  },\n);\n```\n\n## get current first visible item index\n\n```\nint topIndex = itemController.getFirstVisibleIndex();\n```\n\n## Precautions about recycler\n\nThere are something different from the official flutter's [ListView][1] and [GridView][2].\n\nThis package use recycler to recycle (not delete) items when items scroll out-of visible area, and restore (not create) back items when items scroll into visible area.\n\nSo, for some case (ex. your items have animation effect), you should override [didUpdateWidget][3] method in State of StatefulWidget of your item widget, and do something to cleanup some resources or state here (ex. stop animation).\n\nThe method [didUpdateWidget][3] will be called every time when a widget restore-back from recycler, with a new widget configuration pass into.\n\n# Performance tuning\n\nNot assign a key as possible.\n\n- A widget without a key will use recycler to increase performance. Such a widget will be recycled when it is scroll out of screen, and will be reused later when a another new item (maybe with different index) scroll-in.\n- A widget with a key won't be recycled. Such a widget is always created and destroyed when it is scrolling in and out of visible area.\n- only assign a key to widget if items in the visible area will be reordered / removed, and your widget has state that you want to keep after items reordered / removed in visible area.\n- I think it is better to remember item state outside of item widget.\n\n\n[1]: https://api.flutter.dev/flutter/widgets/ListView-class.html \"ListView\"\n[2]: https://api.flutter.dev/flutter/widgets/GridView-class.html \"GridView\"\n[3]: https://api.flutter.dev/flutter/widgets/State/didUpdateWidget.html \"didUpdateWidget\"","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakky1%2Fjk_fast_listview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjakky1%2Fjk_fast_listview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakky1%2Fjk_fast_listview/lists"}