{"id":24702215,"url":"https://github.com/flutter-studio/rebound","last_synced_at":"2025-10-03T16:24:41.301Z","repository":{"id":56830042,"uuid":"225995692","full_name":"flutter-studio/rebound","owner":"flutter-studio","description":"A Flutter library that models spring dynamics and adds real world physics to your app.","archived":false,"fork":false,"pushed_at":"2019-12-06T10:05:40.000Z","size":272,"stargazers_count":15,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-08-20T22:04:26.955Z","etag":null,"topics":["animation","flutter","rebound","spring"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flutter-studio.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":"2019-12-05T02:08:08.000Z","updated_at":"2023-01-16T06:23:38.000Z","dependencies_parsed_at":"2022-09-02T04:00:24.246Z","dependency_job_id":null,"html_url":"https://github.com/flutter-studio/rebound","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flutter-studio%2Frebound","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flutter-studio%2Frebound/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flutter-studio%2Frebound/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flutter-studio%2Frebound/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flutter-studio","download_url":"https://codeload.github.com/flutter-studio/rebound/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235807687,"owners_count":19047985,"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":["animation","flutter","rebound","spring"],"created_at":"2025-01-27T05:32:24.612Z","updated_at":"2025-10-03T16:24:36.256Z","avatar_url":"https://github.com/flutter-studio.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"English | [简体中文](./README_zh-CN.md)\n\n# Flutter Rebound\n\n[![pub package](https://img.shields.io/pub/v/flutter_rebound.svg)](https://pub.dartlang.org/packages/flutter_rebound)\n\nA Flutter library that models spring dynamics and adds real world physics to your app. inspired by Facebook [Rebound](https://github.com/facebook/rebound)\n\n\u003cdiv align=left\u003e\n\u003cimg src=\"https://github.com/flutter-studio/rebound/blob/master/SVID_20191205_120702_1.gif\" width = \"280\"  alt=\"图片名称\" align=center /\u003e\n  \u003c/div\u003e\n  \n## Usage\nTo use this plugin, add `flutter_rebound` as a [dependency in your pubspec.yaml file](https://flutter.io/platform-plugins/).\n\n\n## Example\n\n``` dart\n// Import package\nimport 'package:flutter_rebound/flutter_rebound.dart';\nimport 'package:flutter/material.dart';\nclass MyHomePage extends StatefulWidget {\n  MyHomePage({Key key, this.title}) : super(key: key);\n\n  final String title;\n\n  @override\n  _MyHomePageState createState() =\u003e _MyHomePageState();\n}\n\nclass _MyHomePageState extends State\u003cMyHomePage\u003e with TickerProviderStateMixin {\n  SpringSystem system;\n  Spring spring;\n  double _scale = 1;\n\n  @override\n  void initState() {\n    super.initState();\n    system = SpringSystem(vsync: this);\n    spring = system.createSpring(40, 3);\n    spring.addUpdateListener((spring) {\n      double value = spring.currentValue;\n      _scale = 1 - value * 0.5;\n      setState(() {});\n    });\n    spring.endValue = 1;\n  }\n\n  @override\n  void dispose() {\n    system.dispose();\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return Scaffold(\n      appBar: AppBar(\n        title: Text(widget.title),\n      ),\n      body: Center(\n        child: Transform.scale(\n          scale: _scale,\n          child: Container(\n            width: 200,\n            height: 200,\n            color: Colors.red,\n          ),\n        ),\n      ),\n    );\n  }\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflutter-studio%2Frebound","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflutter-studio%2Frebound","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflutter-studio%2Frebound/lists"}