{"id":26487237,"url":"https://github.com/thorvg/thorvg.flutter","last_synced_at":"2025-08-04T18:34:02.361Z","repository":{"id":228966118,"uuid":"775367204","full_name":"thorvg/thorvg.flutter","owner":"thorvg","description":"ThorVG for Flutter System","archived":false,"fork":false,"pushed_at":"2025-01-24T06:28:45.000Z","size":128,"stargazers_count":2,"open_issues_count":3,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-24T07:24:47.476Z","etag":null,"topics":["flutter-library","flutter-lottie","lottie","thorvg"],"latest_commit_sha":null,"homepage":"https://www.thorvg.org","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/thorvg.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":"2024-03-21T09:01:24.000Z","updated_at":"2025-01-24T06:27:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"8b662203-715b-4d65-a550-d4ecbadb40e8","html_url":"https://github.com/thorvg/thorvg.flutter","commit_stats":null,"previous_names":["thorvg/thorvg.flutter"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thorvg%2Fthorvg.flutter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thorvg%2Fthorvg.flutter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thorvg%2Fthorvg.flutter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thorvg%2Fthorvg.flutter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thorvg","download_url":"https://codeload.github.com/thorvg/thorvg.flutter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244566995,"owners_count":20473451,"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":["flutter-library","flutter-lottie","lottie","thorvg"],"created_at":"2025-03-20T06:36:14.163Z","updated_at":"2025-03-20T06:36:14.677Z","avatar_url":"https://github.com/thorvg.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ThorVG for Flutter\n\n[![pub package](https://img.shields.io/pub/v/thorvg.svg)](https://pub.dev/packages/thorvg)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n\nThis package provides the [ThorVG](https://github.com/thorvg/thorvg) runtime for Flutter, including efficient Lottie animation support via a native API.\n\n\u003e Currently, we only support Lottie Animation feature in this package.\n\n## Supported Platforms\n\n| Platform | Architecture |\n| ------------- | ------------- |\n| Android | arm64-v8a, armeabi-v7a, x86_64 |\n| iOS | arm64, x86_64, x86_64(simulator) |\n\n## Usage\n\n### Lottie\nThe Lottie implementation aims to maintain the same interface as `lottie-flutter`. If you are currently using it, you can simply replace the import statement with `import 'package:thorvg/thorvg.dart'` to utilize the code.\n\n```dart\nimport 'package:thorvg/thorvg.dart';\n// ...\nclass MyApp extends StatelessWidget {\n  const MyApp({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      home: Scaffold(\n        body: Column(\n          children: [\n            // Load a Lottie animation from the assets\n            Lottie.asset('assets/lottie/dancing_star.json'),\n\n            // Load a Lottie animation from a url\n            Lottie.network(\n              'https://lottie.host/6d7dd6e2-ab92-4e98-826a-2f8430768886/NGnHQ6brWA.json'\n            ),\n          ],\n        ),\n      ),\n    );\n  }\n}\n```\n\n## Generate Flutter binding\n\nIf you change the binding interface in these files\n- `tvgFlutterLottieAnimation.h`\n- `tvgFlutterLottieAnimation.cpp`\n\nYou must always run the following script:\n\n```sh\n# Run for the first time\nflutter pub get\n# Generate bindings with ffigen\nflutter pub run ffigen --config ffigen.yaml\n```\n\nYou will get `./lib/src/thorvg_bindings_generated.dart`.\n\n\n## Build\n\nSpecify the ThorVG version in the `.gitmodules` file.\n\n```sh\n[submodule \"thorvg\"]\n  path = thorvg\n  url = git@github.com:thorvg/thorvg.git\n  branch = v0.14.x # Change to version you want\n```\n\nThen you can run the following commands to align with that version before building.\n\n```sh\ngit submodule init\ngit submodule update --remote\n```\n\n### Android\n\nAndroid build requires NDK([LTS](https://developer.android.com/ndk/downloads#lts-downloads)), please specify following build [systems info](https://developer.android.com/ndk/guides/other_build_systems?_gl=1*19sk6gt*_up*MQ..*_ga*MTYxMjIxMTcwMi4xNzE0MTE5NTk1*_ga_6HH9YJMN9M*MTcxNDExOTU5NS4xLjAuMTcxNDExOTU5NS4wLjAuMA..#overview).\n\n```sh\n# Build for Animation(Lottie)\ncd lottie\nsh flutter_build.android.sh $NDK $HOST_TAG $API\n```\n\nCheck whether these files are generated:\n- `android/src/main/arm64-v8a/libthorvg.so`\n- `android/src/main/armeabi-v7a/libthorvg.so`\n- `android/src/main/x86_64/libthorvg.so`\n\n### iOS\n```sh\n# Build for Animation(Lottie)\ncd lottie\nsh flutter_build.ios.sh\n```\n\nCheck whether this file is generated:\n- `ios/Frameworks/libthorvg.dylib`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthorvg%2Fthorvg.flutter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthorvg%2Fthorvg.flutter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthorvg%2Fthorvg.flutter/lists"}