Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency lottie to v3 #44

Merged
merged 1 commit into from
Jan 15, 2024
Merged

Update dependency lottie to v3 #44

merged 1 commit into from
Jan 15, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jan 11, 2024

Mend Renovate

This PR contains the following updates:

Package Type Update Change
lottie dependencies major ^2.7.0 -> ^3.0.0

Release Notes

xvrh/lottie-flutter (lottie)

v3.0.0

Compare Source

  • Add renderCache parameter.
Lottie.asset('assets/complex_animation.json',
  renderCache: RenderCache.raster,
)

Opt-in to a special render mode where the frames of the animation are lazily rendered and kept in a cache.
Subsequent runs of the animation are cheaper to render.

There are 2 kinds of caches:

RenderCache.raster: keep the frame rasterized in the cache (as [dart:ui.Image]).
Subsequent runs of the animation are very cheap for both the CPU and GPU but it takes
a lot of memory.
RenderCache.drawingCommands: keep the frame as a list of graphical operations ([dart:ui.Picture]).
Subsequent runs of the animation are cheaper for the CPU but not for the GPU.

  • Allow to load Telegram Stickers (.tgs)
Lottie.asset(
  'sticker.tgs',
  decoder: LottieComposition.decodeGZip,
)
  • Expose a hook to customize how to decode zip archives. This is useful for dotlottie archives (.lottie) when we want
    to specify a specific .json file inside the archive
Lottie.asset(
  'animation.lottie',
  decoder: customDecoder,
);

Future<LottieComposition?> customDecoder(List<int> bytes) {
  return LottieComposition.decodeZip(bytes, filePicker: (files) {
    return files.firstWhere((f) => f.name == 'animations/cat.json');
  });
}
  • Add backgroundLoading parameter to Lottie.asset|network|file|memory.
    If backgroundLoading is true, the animation will be loaded in a background isolate.
    This is useful for large animations that can take a long time to parse and block the UI work.

  • Remove the name property from LottieComposition

  • imageProviderFactory is not used in .zip file by default anymore.
    To restore the old behaviour, use:

Future<LottieComposition?> decoder(List<int> bytes) {
  return LottieComposition.decodeZip(bytes, imageProviderFactory: imageProviderFactory);
}

Lottie.asset('anim.json', decoder: decoder)
  • Disable gradient cache optimization when ValueDelegate.gradientColor is used
  • Use DefaultAssetBundle.of in AssetLottie before fallback to rootBundle
  • Add BuildContext optional parameter in LottieProvider.load
  • Fixed varying opacity stops across keyframes in the same gradient
  • Fixed rounded corners for non-closed curves
  • Implement auto-orient
  • Add support for layer blend mode
  • Require Flutter 3.16

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@Pante Pante merged commit 8619c1e into master Jan 15, 2024
5 of 6 checks passed
@Pante Pante deleted the renovate/lottie-3.x branch January 15, 2024 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant