{"id":13465525,"url":"https://github.com/faob-dev/folding_cell","last_synced_at":"2025-04-04T19:13:15.547Z","repository":{"id":37612207,"uuid":"160833680","full_name":"faob-dev/folding_cell","owner":"faob-dev","description":"Flutter FoldingCell widget","archived":false,"fork":false,"pushed_at":"2021-03-13T22:11:27.000Z","size":5628,"stargazers_count":563,"open_issues_count":4,"forks_count":40,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-28T18:15:50.183Z","etag":null,"topics":["dart","flutter","flutter-package","flutter-widget"],"latest_commit_sha":null,"homepage":"","language":"Dart","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/faob-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}},"created_at":"2018-12-07T14:25:14.000Z","updated_at":"2025-03-27T07:44:02.000Z","dependencies_parsed_at":"2022-08-18T14:50:09.201Z","dependency_job_id":null,"html_url":"https://github.com/faob-dev/folding_cell","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faob-dev%2Ffolding_cell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faob-dev%2Ffolding_cell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faob-dev%2Ffolding_cell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faob-dev%2Ffolding_cell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/faob-dev","download_url":"https://codeload.github.com/faob-dev/folding_cell/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247234923,"owners_count":20905854,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","flutter","flutter-package","flutter-widget"],"created_at":"2024-07-31T15:00:31.557Z","updated_at":"2025-04-04T19:13:15.529Z","avatar_url":"https://github.com/faob-dev.png","language":"Dart","readme":"# Simple FoldingCell widget\n\nSimple folding cell widget, pass `frontWidget` and `innerWidget` to fold and unfold.\n\n[![pub package](https://img.shields.io/pub/v/folding_cell.svg)](https://pub.dartlang.org/packages/folding_cell)\n\n## Installation\n\nAdd dependency in `pubspec.yaml`:\n```yaml\ndependencies:\n  folding_cell: \"^1.0.2\"\n```\n\nImport in your project:\n```dart\nimport 'package:folding_cell/folding_cell.dart';\n```\n\n## Basic usage\n\n```dart\nclass FoldingCellSimpleDemo extends StatelessWidget {\n  final _foldingCellKey = GlobalKey\u003cSimpleFoldingCellState\u003e();\n\n  @override\n  Widget build(BuildContext context) {\n    return Container(\n      color: Color(0xFF2e282a),\n      alignment: Alignment.topCenter,\n      child: SimpleFoldingCell.create(\n        key: _foldingCellKey,\n        frontWidget: _buildFrontWidget(),\n        innerWidget: _buildInnerWidget(),\n        cellSize: Size(MediaQuery.of(context).size.width, 140),\n        padding: EdgeInsets.all(15),\n        animationDuration: Duration(milliseconds: 300),\n        borderRadius: 10,\n        onOpen: () =\u003e print('cell opened'),\n        onClose: () =\u003e print('cell closed'),\n      ),\n    );\n  }\n\n  Widget _buildFrontWidget() {\n    return Container(\n      color: Color(0xFFffcd3c),\n      alignment: Alignment.center,\n      child: Stack(\n        children: \u003cWidget\u003e[\n          Align(\n            alignment: Alignment.center,\n            child: Text(\n              \"CARD TITLE\",\n              style: GoogleFonts.aldrich(\n                color: Color(0xFF2e282a),\n                fontSize: 20.0,\n                fontWeight: FontWeight.bold,\n              ),\n            ),\n          ),\n          Positioned(\n            right: 10,\n            bottom: 10,\n            child: TextButton(\n              onPressed: () =\u003e _foldingCellKey?.currentState?.toggleFold(),\n              child: Text(\n                \"OPEN\",\n              ),\n              style: TextButton.styleFrom(\n                backgroundColor: Colors.white,\n                minimumSize: Size(80, 40),\n              ),\n            ),\n          )\n        ],\n      ),\n    );\n  }\n\n  Widget _buildInnerWidget() {\n    return Container(\n      color: Color(0xFFecf2f9),\n      padding: EdgeInsets.only(top: 10),\n      child: Stack(\n        children: [\n          Align(\n            alignment: Alignment.topCenter,\n            child: Text(\n              \"CARD TITLE\",\n              style: GoogleFonts.aldrich(\n                color: Color(0xFF2e282a),\n                fontSize: 22.0,\n                fontWeight: FontWeight.bold,\n              ),\n            ),\n          ),\n          Align(\n            alignment: Alignment.center,\n            child: Text(\n              \"CARD DETAIL\",\n              style: GoogleFonts.aldrich(\n                color: Color(0xFF2e282a),\n                fontSize: 40.0,\n              ),\n            ),\n          ),\n          Positioned(\n            right: 10,\n            bottom: 10,\n            child: TextButton(\n              onPressed: () =\u003e _foldingCellKey?.currentState?.toggleFold(),\n              child: Text(\n                \"Close\",\n              ),\n              style: TextButton.styleFrom(\n                backgroundColor: Colors.white,\n                minimumSize: Size(80, 40),\n              ),\n            ),\n          ),\n        ],\n      ),\n    );\n  }\n}\n```\n\n\n## Examples\n\n[example](https://github.com/faob-dev/folding_cell/tree/master/example) project contains these two demos\n\n### Demo 1 - FoldingCell inside Container\n![alt tag](https://raw.githubusercontent.com/faob-dev/folding_cell/master/screenshots/fc_demo1.gif)\n\n### Demo 2 - FoldingCell inside ListView\n![alt tag](https://raw.githubusercontent.com/faob-dev/folding_cell/master/screenshots/fc_demo2.gif)\n\n## Changelog\nCheck [Changelog](https://github.com/faob-dev/folding_cell/blob/master/CHANGELOG.md) for updates\n\n## Bugs/Requests\nReporting issues and requests for new features are always welcome.\n","funding_links":[],"categories":["Components","组件","Dart","UI [🔝](#readme)","Packages"],"sub_categories":["UI"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaob-dev%2Ffolding_cell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffaob-dev%2Ffolding_cell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaob-dev%2Ffolding_cell/lists"}