{"id":18048817,"url":"https://github.com/marcelgarus/implicitly_animated_list","last_synced_at":"2025-04-10T09:53:03.474Z","repository":{"id":53102675,"uuid":"215006697","full_name":"MarcelGarus/implicitly_animated_list","owner":"MarcelGarus","description":"A Flutter widget that implicitly animates a list whenever it rebuilds with new items.","archived":false,"fork":false,"pushed_at":"2024-12-21T09:05:38.000Z","size":2163,"stargazers_count":10,"open_issues_count":6,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T08:47:51.617Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/MarcelGarus.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-10-14T09:50:00.000Z","updated_at":"2025-03-07T11:59:19.000Z","dependencies_parsed_at":"2024-12-21T10:18:54.677Z","dependency_job_id":"6119ca95-85ff-4a3c-b696-0775be82a31f","html_url":"https://github.com/MarcelGarus/implicitly_animated_list","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/MarcelGarus%2Fimplicitly_animated_list","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcelGarus%2Fimplicitly_animated_list/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcelGarus%2Fimplicitly_animated_list/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcelGarus%2Fimplicitly_animated_list/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MarcelGarus","download_url":"https://codeload.github.com/MarcelGarus/implicitly_animated_list/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248198224,"owners_count":21063626,"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-10-30T20:15:27.687Z","updated_at":"2025-04-10T09:53:03.436Z","avatar_url":"https://github.com/MarcelGarus.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"Often, your lists represent some kind of data.\n\nYou can just pass the original list data to the `ImplicitlyAnimatedList` as\nwell as an `itemBuilder` for building a widget from one data point, and it'll\nanimate whenever the data changes:\n\n```dart\nImplicitlyAnimatedList(\n  // When you change items of this list and hot reload, the list animates.\n  itemData: [1, 2, 3, 4],\n  itemBuilder: (_, number) =\u003e ListTile(title: Text('$number')),\n),\n```\n\nIt works with all classes and works well with `StreamBuilder`:\n\n```dart\nclass User {\n  const User({required this.firstName, required this.lastName});\n\n  final String firstName;\n  final String lastName;\n\n  // The ImplicitlyAnimatedList uses the == operator to compare items.\n  bool operator ==(Object other) =\u003e other is User\n    \u0026\u0026 firstName == other.firstName\n    \u0026\u0026 lastName == other.lastName;\n}\n\n...\n\nStreamBuilder\u003cList\u003cUser\u003e\u003e(\n  stream: someSource.usersStream,\n  builder: (context, snapshot) {\n    if (!snapshot.hasData) {\n      return ...;\n    }\n    return ImplicitlyAnimatedList(\n      itemData: snapshot.data,\n      itemBuilder: (context, user) {\n        return ListTile(title: Text('${user.firstName} ${user.lastName}'));\n      }\n    );\n  }\n)\n```\n\nHere's an example that generates random numbers and animates from one state to the next (notice it's only 10 fps because of being a GIF):\n\n![example showcase](showcase.gif)\n\nIn addition to `ImplicitlyAnimatedList`, there's also `SliverImplicitlyAnimatedList` for use in a `CustomScrollView`:\n\n```dart\nCustomScrollView(\n  slivers: [\n    SliverImplicitlyAnimatedList(\n      itemData: myListOfItems,\n      itemBuilder: (context, item) =\u003e ListTile(title: Text('$item')),\n    ),\n    // ...\n  ],\n),\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcelgarus%2Fimplicitly_animated_list","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcelgarus%2Fimplicitly_animated_list","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcelgarus%2Fimplicitly_animated_list/lists"}