{"id":13471251,"url":"https://github.com/MarcinusX/snappable","last_synced_at":"2025-03-26T13:30:57.181Z","repository":{"id":48113874,"uuid":"200716536","full_name":"MarcinusX/snappable","owner":"MarcinusX","description":"Thanos snap effect in Flutter","archived":false,"fork":false,"pushed_at":"2023-10-01T19:00:04.000Z","size":66,"stargazers_count":335,"open_issues_count":12,"forks_count":34,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-10-30T02:59:22.544Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://fidev.io/thanos","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MarcinusX.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":"2019-08-05T19:29:21.000Z","updated_at":"2024-08-13T05:47:18.000Z","dependencies_parsed_at":"2024-10-30T01:51:54.219Z","dependency_job_id":null,"html_url":"https://github.com/MarcinusX/snappable","commit_stats":{"total_commits":9,"total_committers":4,"mean_commits":2.25,"dds":0.5555555555555556,"last_synced_commit":"11ac439b3b1edee7ff37891613b1098c56383c1d"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcinusX%2Fsnappable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcinusX%2Fsnappable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcinusX%2Fsnappable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcinusX%2Fsnappable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MarcinusX","download_url":"https://codeload.github.com/MarcinusX/snappable/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245662778,"owners_count":20652081,"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":[],"created_at":"2024-07-31T16:00:42.221Z","updated_at":"2025-03-26T13:30:56.843Z","avatar_url":"https://github.com/MarcinusX.png","language":"Dart","funding_links":[],"categories":["Dart"],"sub_categories":[],"readme":"# snappable\n\nThanos effect library in Flutter\n\nCheck out [blog post](https://fidev.io/thanos) describing the package on [Fidev](https://fidev.io).\n\n## Examples\n![Example 1](https://user-images.githubusercontent.com/16286046/62490322-51313680-b7c9-11e9-91f2-1363c292f544.gif)\n![Example 2](https://user-images.githubusercontent.com/16286046/62490326-52626380-b7c9-11e9-9ed3-5545e3175cb6.gif)\n![Example 3](https://user-images.githubusercontent.com/16286046/62490340-5bebcb80-b7c9-11e9-8bcf-e94c18f25f1b.gif)\n\n\n## Getting Started\n\n### Import it\n```dart\nimport 'package:snappable/snappable.dart';\n```\n\n### Wrap any widget in Snappable\n```dart\n@override\nWidget build(BuildContext context) {\n  return Snappable(\n    child: Text('This will be snapped'),\n  );\n}\n```\n#### Snap with a Key\n```dart\n\nclass MyWidget extends StatelessWidget {\n  final key = GlobalKey\u003cSnappableState\u003e();\n  @override\n  Widget build(BuildContext context) {\n    return Snappable(\n      key: key,\n      child: Text('This will be snapped'),\n    );\n  }\n  \n  void snap() {\n    key.currentState.snap();\n  }\n}\n```\nUndo by `currentState.reset()`.\n#### or snap by tap\n```dart\n\nclass MyWidget extends StatelessWidget {\n  @override\n  Widget build(BuildContext context) {\n    return Snappable(\n      snapOntap: true,\n      child: Text('This will be snapped'),\n    );\n  }\n}\n```\n Undo by tapping again.\n \n ### Callback for when the snap ends\n ```dart\n \n class MyWidget extends StatelessWidget {\n   @override\n   Widget build(BuildContext context) {\n     return Snappable(\n       onSnapped: () =\u003e print(\"Snapped!\"),\n       child: Text('This will be snapped'),\n     );\n   }\n }\n ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMarcinusX%2Fsnappable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMarcinusX%2Fsnappable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMarcinusX%2Fsnappable/lists"}