搜索插件、代码仓与 APP 分类

插件详情v1.0.4

explode_view

一个漂亮的 Flutter 动画库,可将图像分解为小颗粒。当需要从屏幕上移除图像时,可以使用此包。

近 30 天下载
40
喜欢数
59
Pub 分数
40

安装插件

flutter pub add explode_view

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

ExplodeView 是一个 Flutter 动画库,通过将图像分解为小颗粒来创建视觉冲击力强的效果。非常适合在需要以动态且引人入胜的方式从屏幕上移除图像的过渡场景中使用,它通过流畅且可自定义的动画提升了用户体验。该包利用 Flutter 的渲染功能,无需复杂的手动实现即可提供高性能的粒子效果。在涉及图像移除的应用界面中特别有用,例如滑动删除或交互式相册。该库是开源的,并由社区驱动的项目维护。

适合场景

  • 图像移除过渡
  • 交互式相册
  • 滑动删除动画
  • 应用引导流程
  • 删除操作的视觉反馈

主要特点

  • 基于粒子的图像爆炸
  • 可自定义的动画速度
  • 流畅且性能出色的渲染
  • 开源且由社区维护
  • 通过 pub 实现轻松集成
  • 支持自定义粒子形状

适合对象

  • 寻求UI过渡视觉效果的开发者
  • 具有交互式图像处理功能的应用程序
  • 注重设计的 Flutter 应用程序
  • 原型化引人入胜的用户交互
  • 注重动画质量的项目

使用建议

  • 可能会影响低端设备的性能
  • 需要仔细调整才能获得最佳视觉效果
  • 有限的平台特定自定义
  • 最适合持续时间较短的动画
  • 不适合静态或非交互式内容

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。


A new open-source Flutter project that enables the developers to quickly enhance the ui of their application and can easily get started with the Flutter animation. The UI has been inspired from Redmi's uninstall application animation shown [here](https://github.com/mdg-soc-19/explode-view/blob/master/gif/explode-view-idea.gif).

This project contains the features of Flutter Animation that are required to complete an amazing Flutter application.

Explore how ExplodeView is made through this blog.

Index

Installing

1. Depend on it

Add this to your package's pubspec.yaml file:

  explode_view: ^1.0.4
2. Install it

You can install packages from the command line:

with pub:

$ pub get  

with Flutter:

$ flutter packages get  

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import  'package:explode_view/explode_view.dart';  

How To Use

Let's get this animation

For the explosion animation in the app, user has to simply add the ExplodeView as a child in any Widget like Stack and many more.

Example Code:

ExplodeView(  
 imagePath: 'assets/images/abc.png',  // path where the image is stored 
 imagePosFromLeft: 	120.0, // set x-coordinate for image 
 imagePosFromRight: 300.0,  // set y-coordinate for image 
);

For more info, please refer to the main.dart in example.

Algorithm

The algorithm used to build this project is as follows:

On clicking the image, the image would shake for some time and will disappear with generation of random particles in that image area and they would scatter farther with fading and upcoming transition and disappear finally on the screen. The colors of the particles are decided by the colors of the pixels of the image which provides the effect of breaking the image into pieces.

For more info, please refer to the explode_view.dart.

Documentation

Dart attribute Datatype Description Default Value
imagePath String The string which gives the path to the image. @required
imagePosFromLeft double The distance from the left edge of the screen. @required
imagePosFromTop double The distance from the top edge of the screen. @required

Bugs/Requests

If you encounter any problems feel free to open an issue. If you feel the library is
missing a feature, please raise a ticket on Github and I'll look into it.
Pull request are also welcome.

License

ExplodeView is licensed under MIT License. View license.

所属分类

依赖

依赖清单 2 项

源码仓库

使用此插件的项目

暂无相关数据。