feat: Integrate dotlottie_flutter for enhanced Lottie animation support#2249
Open
M-Talha4 wants to merge 2 commits into
Open
feat: Integrate dotlottie_flutter for enhanced Lottie animation support#2249M-Talha4 wants to merge 2 commits into
M-Talha4 wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Migrates Ensemble’s Lottie widget implementation from the lottie package to dotlottie_flutter, adding support for .lottie bundles and unifying web/native rendering around the dotlottie platform view approach.
Changes:
- Replaced the
lottiedependency withdotlottie_flutterand updated the Lottie widget/controller implementation to drive dotlottie platform views. - Added helper components for byte-backed
.lottieplayback (DotLottieBytesView) and a wrapper controller (EnsembleDotLottieController). - Updated Android build config to include JitPack and documented the setup in the starter README.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| starter/README.md | Adds Android JitPack setup notes for dotlottie dependencies. |
| starter/android/build.gradle | Adds JitPack Maven repo to resolve dotlottie-android transitive deps. |
| modules/ensemble/pubspec.yaml | Swaps lottie for dotlottie_flutter. |
| modules/ensemble/lib/widget/lottie/web/lottiestate.dart | Replaces web-specific implementation with an export of the native state. |
| modules/ensemble/lib/widget/lottie/native/lottiestate.dart | Refactors native state to load/render via dotlottie views (including bytes + aspect ratio handling). |
| modules/ensemble/lib/widget/lottie/lottie.dart | Updates controller + source resolution utilities for dotlottie sources. |
| modules/ensemble/lib/widget/lottie/ensemble_dot_lottie_controller.dart | Adds controller wrapper to unify delegate vs MethodChannel control paths. |
| modules/ensemble/lib/widget/lottie/dot_lottie_bytes_view.dart | Adds platform-view widget to feed .lottie bytes to native players. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Migrate the Ensemble framework from the
lottiepackage todotlottie_flutterfor enhanced Lottie animation support. This integration provides better compatibility, performance improvements, and access to new dotlottie features including DotLottie file format support.Type of Change
What Has Changed
Dependencies
lottie: ^3.0.0withdotlottie_flutter: ^0.1.3inmodules/ensemble/pubspec.yamlCore Implementation
New Files:
modules/ensemble/lib/widget/lottie/dot_lottie_bytes_view.dart- View component for handling DotLottie bytes data and renderingmodules/ensemble/lib/widget/lottie/ensemble_dot_lottie_controller.dart- Controller class for managing DotLottie animations and lifecycleUpdated Files:
modules/ensemble/lib/widget/lottie/lottie.dart- Refactored main Lottie widget to support dotlottie_flutter with backward compatibilitymodules/ensemble/lib/widget/lottie/native/lottiestate.dart- Updated native (Android/iOS) implementation to use dotlottie_flutter packagemodules/ensemble/lib/widget/lottie/web/lottiestate.dart- Simplified web implementation as dotlottie_flutter handles cross-platform supportAndroid Configuration
starter/android/build.gradle(bothbuildscriptandallprojectssections)Documentation
starter/README.mdwith Android JitPack setup instructions for dotlottie supportHow to Test
helloAppadd assets for testingscreens/Hello Home.yamladd the lottie widget with source and TestChecklist
flutter analyzeand addressed any new warningsflutter testand all tests pass