{"id":13551347,"url":"https://github.com/Norbert515/flutter_sequence_animation","last_synced_at":"2025-04-03T01:32:21.687Z","repository":{"id":52809073,"uuid":"136471158","full_name":"Norbert515/flutter_sequence_animation","owner":"Norbert515","description":"Orchestrate multiple animations with ease.","archived":false,"fork":false,"pushed_at":"2022-09-20T12:05:33.000Z","size":714,"stargazers_count":392,"open_issues_count":1,"forks_count":34,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-10-30T00:37:03.833Z","etag":null,"topics":[],"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/Norbert515.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-06-07T12:02:06.000Z","updated_at":"2024-10-24T19:31:07.000Z","dependencies_parsed_at":"2022-08-23T07:20:45.474Z","dependency_job_id":null,"html_url":"https://github.com/Norbert515/flutter_sequence_animation","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/Norbert515%2Fflutter_sequence_animation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Norbert515%2Fflutter_sequence_animation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Norbert515%2Fflutter_sequence_animation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Norbert515%2Fflutter_sequence_animation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Norbert515","download_url":"https://codeload.github.com/Norbert515/flutter_sequence_animation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222905781,"owners_count":17055817,"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-08-01T12:01:46.494Z","updated_at":"2024-11-03T21:31:59.049Z","avatar_url":"https://github.com/Norbert515.png","language":"Dart","readme":"# flutter_sequence_animation\n\n### Features\n- No need to use intervals and calculate percentages for your total animation time. \n- Animate the same variable with multiple animatables!\n- You only need one AnimationController\n- Intuitive and easy to use interface\n\n# Installation\n\n\n```\ndependencies:\n  flutter_sequence_animation: \"^4.0.0\"\n```\n\n\nthen\n```\n$ flutter packages get\n```\nthen\n```\nimport 'package:flutter_sequence_animation/flutter_sequence_animation.dart';\n```\n\n# Demo\n\n![alt-text-1](assets/colors.gif \"title-1\") ![alt-text-1](assets/size.gif \"title-1\")![alt-text-1](assets/staggered.gif \"title-1\")\n\n# Code\n\n_The Staggered Animation example from [here](https://flutter.io/animations/staggered-animations/) is\n207 lines of [code](https://raw.githubusercontent.com/flutter/website/master/_includes/code/animation/basic_staggered_animation/main.dart) .\nThe same animation with this package is 128 lines of [code](https://github.com/Norbert515/flutter_sequence_animation/blob/master/example/lib/staggered_animation_replication.dart).\nIt is also much easier to read and edit._\n\n#### You specify a sequence of animatables like this:\n``` dart\n    sequenceAnimation = new SequenceAnimationBuilder()\n      .addAnimatable(\n          animatable: new ColorTween(begin: Colors.red, end: Colors.yellow),\n          from:  const Duration(seconds: 0),\n          to: const Duration(seconds: 2),\n          tag: \"color\"\n        ).addAnimatable(\n          animatable: new ColorTween(begin: Colors.yellow, end: Colors.blueAccent),\n          from:  const Duration(seconds: 2),\n          to: const Duration(seconds: 4),\n          tag: \"color\",\n          curve: Curves.easeOut\n        ).addAnimatable(\n          animatable: new ColorTween(begin: Colors.blueAccent, end: Colors.pink),\n          //  animatable: new Tween\u003cdouble\u003e(begin: 200.0, end: 40.0),\n          from:  const Duration(seconds: 5),\n          to: const Duration(seconds: 6),\n          tag: \"color\",\n          curve: Curves.fastOutSlowIn\n        ).animate(controller);\n```\nIn this case only the color is animated but you can add as many different properties to the sequence as you'd like to.\nThe only restriction is that animations with the same tag can not overlap and need to be ordered.\n\n#### Now you can access the resulting animation from anywhere in your code with\n```dart\nsequenceAnimation[\"color\"]\n```\nThis animation is a composition of all animatables you passed in with the same tag.\n\n#### Example usage of this example:\n```dart\nnew AnimatedBuilder(\n          builder: (context, child) {\n            return new Center(\n              child: new Container(\n                color: sequenceAnimation[\"color\"].value,\n                height: 200.0,\n                width: 200.0,\n              ),\n            );\n          },\n          animation: controller,\n        ),\n```\n\n#### The animation duration is set automatically (don't change the duration of the controller yourself).\n\n### Sepcial thanks to [Simon Lightfoot](https://github.com/slightfoot) for the help!\n\n\n## Getting Started\n\nFor help getting started with Flutter, view our online [documentation](https://flutter.io/).\n\nFor help on editing package code, view the [documentation](https://flutter.io/developing-packages/).\n","funding_links":[],"categories":["框架","Frameworks","Dart","Animation [🔝](#readme)"],"sub_categories":["动画","Animation"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNorbert515%2Fflutter_sequence_animation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FNorbert515%2Fflutter_sequence_animation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNorbert515%2Fflutter_sequence_animation/lists"}