{"id":32277129,"url":"https://github.com/wjlee611/custom_tabbarview","last_synced_at":"2026-02-21T08:02:26.213Z","repository":{"id":298254155,"uuid":"999327305","full_name":"wjlee611/custom_tabbarview","owner":"wjlee611","description":"Flutter TabBarView, but with enhanced customization capabilities.","archived":false,"fork":false,"pushed_at":"2025-06-11T03:33:02.000Z","size":4554,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-23T00:07:56.206Z","etag":null,"topics":["animation","custom","flutter","tabbarview"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/custom_tabbarview","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wjlee611.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}},"created_at":"2025-06-10T05:05:08.000Z","updated_at":"2025-06-13T05:58:23.000Z","dependencies_parsed_at":"2025-06-10T07:31:55.831Z","dependency_job_id":null,"html_url":"https://github.com/wjlee611/custom_tabbarview","commit_stats":null,"previous_names":["wjlee611/custom_tabbarview"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wjlee611/custom_tabbarview","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wjlee611%2Fcustom_tabbarview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wjlee611%2Fcustom_tabbarview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wjlee611%2Fcustom_tabbarview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wjlee611%2Fcustom_tabbarview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wjlee611","download_url":"https://codeload.github.com/wjlee611/custom_tabbarview/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wjlee611%2Fcustom_tabbarview/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29676983,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T06:23:40.028Z","status":"ssl_error","status_checked_at":"2026-02-21T06:23:39.222Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["animation","custom","flutter","tabbarview"],"created_at":"2025-10-23T00:02:20.421Z","updated_at":"2026-02-21T08:02:26.207Z","avatar_url":"https://github.com/wjlee611.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# custom_tabbarview\n\nThis package is almost identical to the TabBarView API in the Flutter SDK, but with enhanced customization capabilities.\n\n\u003cimg src=\"https://github.com/user-attachments/assets/d23b9920-8fcd-4fcf-b7d7-d8c184af7937\" width=\"200px\" /\u003e\n\n## Presets\n\n\u003ctable style=\"border: 1px solid black\"\u003e\n    \u003ctbody\u003e\n        \u003ctr\u003e\n            \u003ctd align=\"center\" style=\"border: 1px solid black\"\u003e\n                \u003cimg src=\"https://github.com/user-attachments/assets/44fa349b-9386-4cc5-ba77-b446a7b8f0a7\" width=\"200px\" /\u003e\n            \u003c/td\u003e\n            \u003ctd align=\"center\" style=\"border: 1px solid black\"\u003e\n                \u003cimg src=\"https://github.com/user-attachments/assets/17fcd557-e01a-496b-a42c-04c437c4660b\" width=\"200px\" /\u003e\n            \u003c/td\u003e\n            \u003ctd align=\"center\" style=\"border: 1px solid black\"\u003e\n                \u003cimg src=\"https://github.com/user-attachments/assets/59a1f0e4-e27b-4716-b103-f078571abf07\" width=\"200px\" /\u003e\n            \u003c/td\u003e   \n        \u003c/tr\u003e\n        \u003ctr\u003e\n            \u003ctd align=\"center\" style=\"border: 1px solid black\"\u003e\n                \u003cspan\u003efade\u003c/span\u003e\n            \u003c/td\u003e\n            \u003ctd align=\"center\" style=\"border: 1px solid black\"\u003e\n                \u003cspan\u003estack\u003c/span\u003e\n            \u003c/td\u003e\n            \u003ctd align=\"center\" style=\"border: 1px solid black\"\u003e\n                \u003cspan\u003ecarousel\u003c/span\u003e\n            \u003c/td\u003e   \n        \u003c/tr\u003e\n        \u003ctr\u003e\n            \u003ctd align=\"center\" style=\"border: 1px solid black\"\u003e\n                \u003cimg src=\"https://github.com/user-attachments/assets/efe9a525-eb28-4c82-80d6-13bd9cbd520b\" width=\"200px\" /\u003e\n            \u003c/td\u003e\n            \u003ctd align=\"center\" style=\"border: 1px solid black\"\u003e\n                \u003cimg src=\"https://github.com/user-attachments/assets/89fc1456-e025-4a71-99a0-5e8201e21a65\" width=\"200px\" /\u003e\n            \u003c/td\u003e\n            \u003ctd align=\"center\" style=\"border: 1px solid black\"\u003e\n            \u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n            \u003ctd align=\"center\" style=\"border: 1px solid black\"\u003e\n                \u003cspan\u003etoss1\u003c/span\u003e\n            \u003c/td\u003e\n            \u003ctd align=\"center\" style=\"border: 1px solid black\"\u003e\n                \u003cspan\u003etoss2\u003c/span\u003e\n            \u003c/td\u003e\n            \u003ctd align=\"center\" style=\"border: 1px solid black\"\u003e\n            \u003c/td\u003e\n        \u003c/tr\u003e\n    \u003c/tbody\u003e\n\u003c/table\u003e\n\n## Features\n\n1. It's a direct clone of TabBarView from the Flutter SDK, so more than 95% of the codebase is identical and reliable.\n2. The widgets in children(tabs) are all built lazily, with keepAlive behavior as needed.\n   ![lazy_build](https://github.com/user-attachments/assets/48eb4e79-c23e-4dd4-acbe-937d3c6d6010)\n3. Transition animations are 100% customizable based on transition rate.\n4. There are plenty of presets to get you started quickly, and hints for customization.\n\n## Migration guide\n\n### from TabBarView to CustomTabBarView\n\nIf you were previously using TabBarView, you can follow these steps to migrate.\n\n1. Change from `TabBarView` to `CustomTabBarView`.\n\nIf you want to use the main feature -- `.builder` in addition, you can follow the steps below.\n\n2. Rename `chindren` to `tabs`.\n3. Implement `builder` type of `CustomTabBarViewBuilder` or just use other named constructor.\n\n### from v0.x to v1.x\n\nIf you were previously using CustomTabBarView.builder, you can follow these steps to migrate.\n\n1. Change from `builder` constructor to `custom`.\n2. Change from `builder` parameter to `builderDelegate` and put previous builder function into builderDelegate class.\n\n```dart\n// AS-IS\nCustomTabBarView.builder(\n  controller: controller,\n  tabs: tabs,\n  builder: (context, pageController, childrenWithKey, index) {\n    return childrenWithKey[index];\n  }\n)\n// TO-BE\nCustomTabBarView.custom(\n  controller: controller,\n  tabs: tabs,\n  builderDelegate: CustomTabBarViewCustomBuilderDelegate(\n    (context, pageController, childrenWithKey, index) {\n      return childrenWithKey[index];\n    },\n  ),\n)\n```\n\n## Types (new API)\n\n### CustomTabBarViewBuilder\n\nThe type of builder method used globally in CustomTabBarView.\n\nIt returns a Widget and takes the following arguments:\n\n- `context`: `BuildContext` for the widget.\n- `offset`: The offset value for each widget in the TabBarView.\n  1: left / 0: center / -1: right\n- `widget`: Each child widget of tabs.\n\n### CustomTabBarViewCustomBuilder\n\nThe type of custom builder method used globally in CustomTabBarView.\n\nIt returns a Widget and takes the following arguments:\n\n- `context`: `BuildContext` for the widget.\n- `pageController`: A `PageController` for PageView that internally implements TabBarView.\n- `childrenWithKey`: The children or tabs passed in.  \n  However, the implementation of TabBarView temporarily changes the order of the child widgets on transition.\n- `index`: The index of the widget currently being displayed in the TabBarView.\n\n\u003e [!IMPORTANT]\n\u003e You can get the child that match the TabController with `childrenWithKey[index]`.\n\n## Example\n\nExcept for the default constructor, the code snippet below performs the same behavior.\n\n### default constructor\n\n```dart\nCustomTabBarView(\n  controller: _tabController,\n  children: _children,\n)\n```\n\n### builder\n\n```dart\nCustomTabBarView.builder(\n  controller: _tabController,\n  tabs: _children,\n  builder: (context, offset, child) {\n    final dx = offset * width * 0.8;\n    final scale = 1 - offset.abs() * 0.1;\n    final opacity = 1 - offset.abs() * 2;\n\n    return Opacity(\n      opacity: opacity.clamp(0.0, 1.0),\n      child: Transform.scale(\n        scale: scale,\n        child: Transform.translate(offset: Offset(dx, 0), child: child),\n      ),\n    );\n  },\n)\n```\n\n### custom 1\n\n```dart\nCustomTabBarView.custom(\n  controller: _tabController,\n  physics: const PageScrollPhysics(),\n  dragStartBehavior: DragStartBehavior.down,\n  tabs: _children,\n  builderDelegate: CustomTabBarViewBuilderDelegate(\n    (context, offset, child) {\n      final dx = offset * width * 0.8;\n      final scale = 1 - offset.abs() * 0.1;\n      final opacity = 1 - offset.abs() * 2;\n\n      return Opacity(\n        opacity: opacity.clamp(0.0, 1.0),\n        child: Transform.scale(\n          scale: scale,\n          child: Transform.translate(offset: Offset(dx, 0), child: child),\n        ),\n      );\n    },\n  ),\n)\n```\n\n### custom 2\n\n```dart\nCustomTabBarView.custom(\n  controller: _tabController,\n  tabs: _children,\n  builderDelegate: CustomTabBarViewCustomBuilderDelegate(\n    (context, pageController, childrenWithKey, index) {\n      return AnimatedBuilder(\n        animation: pageController,\n        builder: (context, child) {\n          final page = pageController.page ??\n              pageController.initialPage.toDouble();\n          final offset = (page - index) * pageController.viewportFraction;\n\n          final dx = offset * width * 0.8;\n          final scale = 1 - offset.abs() * 0.1;\n          final opacity = 1 - offset.abs() * 2;\n\n          return Opacity(\n            opacity: opacity.clamp(0.0, 1.0),\n            child: Transform.scale(\n              scale: scale,\n              child: Transform.translate(\n                  offset: Offset(dx, 0), child: child),\n            ),\n          );\n        },\n        child: childrenWithKey[index],\n      );\n    },\n  ),\n)\n```\n\n### preset\n\n```dart\n CustomTabBarView.carousel(\n  controller: _tabController,\n  physics: const PageScrollPhysics(),\n  dragStartBehavior: DragStartBehavior.down,\n  tabs: _children,\n)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwjlee611%2Fcustom_tabbarview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwjlee611%2Fcustom_tabbarview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwjlee611%2Fcustom_tabbarview/lists"}