Skip to content

feat: Integrate dotlottie_flutter for enhanced Lottie animation support#2249

Open
M-Talha4 wants to merge 2 commits into
mainfrom
chore/migrate-lottie-to-dotlottie-flutter
Open

feat: Integrate dotlottie_flutter for enhanced Lottie animation support#2249
M-Talha4 wants to merge 2 commits into
mainfrom
chore/migrate-lottie-to-dotlottie-flutter

Conversation

@M-Talha4
Copy link
Copy Markdown
Contributor

@M-Talha4 M-Talha4 commented Jun 2, 2026

Description

Migrate the Ensemble framework from the lottie package to dotlottie_flutter for 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

  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Bug fix (non-breaking change that fixes an issue)
  • Documentation update
  • Refactoring (no functional changes)

What Has Changed

Dependencies

  • Replaced lottie: ^3.0.0 with dotlottie_flutter: ^0.1.3 in modules/ensemble/pubspec.yaml

Core Implementation

  • New Files:

    • modules/ensemble/lib/widget/lottie/dot_lottie_bytes_view.dart - View component for handling DotLottie bytes data and rendering
    • modules/ensemble/lib/widget/lottie/ensemble_dot_lottie_controller.dart - Controller class for managing DotLottie animations and lifecycle
  • Updated Files:

    • modules/ensemble/lib/widget/lottie/lottie.dart - Refactored main Lottie widget to support dotlottie_flutter with backward compatibility
    • modules/ensemble/lib/widget/lottie/native/lottiestate.dart - Updated native (Android/iOS) implementation to use dotlottie_flutter package
    • modules/ensemble/lib/widget/lottie/web/lottiestate.dart - Simplified web implementation as dotlottie_flutter handles cross-platform support

Android Configuration

  • Added JitPack Maven repository to starter/android/build.gradle (both buildscript and allprojects sections)
  • Required for dotlottie-android transitive dependency resolution

Documentation

  • Updated starter/README.md with Android JitPack setup instructions for dotlottie support

How to Test

  1. Follow the starter/README.md to run project locally.
  2. In the helloApp add assets for testing
  3. In the screens/Hello Home.yaml add the lottie widget with source and Test

Checklist

  • I have run flutter analyze and addressed any new warnings
  • I have run flutter test and all tests pass
  • I have tested my changes on the relevant platform(s) (Android, iOS, Web)
  • I have updated documentation (Android JitPack setup in README)
  • My changes do not introduce new warnings or errors
  • Lottie animations render correctly across all platforms
  • Dependencies are properly configured for all build environments

Copilot AI review requested due to automatic review settings June 2, 2026 03:12
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 lottie dependency with dotlottie_flutter and updated the Lottie widget/controller implementation to drive dotlottie platform views.
  • Added helper components for byte-backed .lottie playback (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.

Comment thread modules/ensemble/lib/widget/lottie/dot_lottie_bytes_view.dart
Comment thread starter/README.md Outdated
Comment thread modules/ensemble/lib/widget/lottie/lottie.dart Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants