{"id":17168184,"url":"https://github.com/brunojurkovic/flip_card","last_synced_at":"2025-05-15T04:05:38.215Z","repository":{"id":37905662,"uuid":"149692858","full_name":"BrunoJurkovic/flip_card","owner":"BrunoJurkovic","description":"A Flutter widget that easily adds the flipping animation to any widget","archived":false,"fork":false,"pushed_at":"2025-03-23T15:59:38.000Z","size":1442,"stargazers_count":349,"open_issues_count":17,"forks_count":105,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-05-15T04:05:30.921Z","etag":null,"topics":["card","dart","flutter","flutter-package"],"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/BrunoJurkovic.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":"2018-09-21T01:31:14.000Z","updated_at":"2025-04-23T13:10:40.000Z","dependencies_parsed_at":"2024-01-20T03:39:46.627Z","dependency_job_id":"a8eaf1c4-7e8e-45a4-822a-6446077986aa","html_url":"https://github.com/BrunoJurkovic/flip_card","commit_stats":null,"previous_names":["fedeoo/flip_card"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrunoJurkovic%2Fflip_card","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrunoJurkovic%2Fflip_card/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrunoJurkovic%2Fflip_card/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrunoJurkovic%2Fflip_card/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BrunoJurkovic","download_url":"https://codeload.github.com/BrunoJurkovic/flip_card/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254270645,"owners_count":22042859,"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":["card","dart","flutter","flutter-package"],"created_at":"2024-10-14T23:11:23.263Z","updated_at":"2025-05-15T04:05:33.198Z","avatar_url":"https://github.com/BrunoJurkovic.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flip_card [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/fedeoo/flip_card/pulls) [![Pub Package](https://img.shields.io/pub/v/flip_card.svg)](https://pub.dartlang.org/packages/flip_card)\n\nA component that provides a flip card animation. It could be used for hiding and showing details of a product.\n\n\u003cp\u003e\n  \u003cimg src=\"/screenshots/flip-h.gif?raw=true\u0026v1\" width=\"320\" /\u003e\n  \u003cimg src=\"/screenshots/flip-v.gif?raw=true\u0026v1\" width=\"320\" /\u003e\n\u003c/p\u003e\n\n## How to use\n\nImport the package\n\n```dart\nimport 'package:flip_card/flip_card.dart';\n```\n\n### Default\n\nCreate a flip card as shown below. By default the card is touch controlled.\n\nYou can turn off touch control by setting `flipOnTouch` to `false`.\n\n```dart\nFlipCard(\n  fill: Fill.fillBack, // Fill the back side of the card to make in the same size as the front.\n  direction: Axis.horizontal, // default\n  initialSide: CardSide.front, // The side to initially display.\n  front: Container(\n    child: Text('Front'),\n  ),\n  back: Container(\n    child: Text('Back'),\n  ),\n)\n```\n\n### Programmatically\n\n#### Controller (Recommended)\n\nTo control the card programmatically, you can pass a controller\nwhen creating the card.\n\n```dart\nlate FlipCardController _controller = FlipCardController();\n\n@override\nWidget build(BuildContext context) {\n  return FlipCard(\n    controller: _controller,\n    front: ...,\n    back: ...,\n  );\n}\n\nvoid doStuff() {\n  // Flip the card a bit and back to indicate that it can be flipped (for example on page load)\n  _controller.hint(\n    duration: const Duration(milliseconds: 400),\n  );\n\n  // Tilt the card a bit (for example when hovering)\n  _controller.skew(0.2);\n\n  // Flip the card programmatically\n  _controller.flip();\n\n  // Flip the card to front specifically\n  _controller.flip(CardSide.front);\n\n  // Flip the card without animation\n  _controller.flipWithoutAnimation();\n}\n```\n\n#### Global Key\n\nYou can also control the card via a global key as shown below.\n\nThis is not the recommended way.\n\n```dart\nfinal cardKey = GlobalKey\u003cFlipCardState\u003e();\n\n@override\nWidget build(BuildContext context) {\n  return FlipCard(\n    key: cardKey,\n    flipOnTouch: false,\n    front: Container(\n      child: RaisedButton(\n        onPressed: () =\u003e cardKey.currentState.toggleCard(),\n        child: Text('Toggle'),\n      ),\n    ),\n    back: Container(\n      child: Text('Back'),\n    ),\n  );\n}\n```\n\n### Timed\n\nYou can auto-flip the widget after a certain delay without any external triggering.\n\n```dart\nFlipCard(\n  fill: Fill.back, // Fill the back side of the card to make in the same size as the front.\n  direction: Axis.horizontal, // default\n  initialSide: CardSide.front, // The side to initially display.\n  front: Container(\n    child: Text('Front'),\n  ),\n  back: Container(\n    child: Text('Back'),\n  ),\n  autoFlipDuration: const Duration(seconds: 2), // The flip effect will work automatically after the 2 seconds\n)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrunojurkovic%2Fflip_card","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrunojurkovic%2Fflip_card","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrunojurkovic%2Fflip_card/lists"}