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

插件详情v1.0.5

kenburns

在Flutter中实现Ken Burns效果。Ken Burns效果是一种在视频制作中从静态图像中使用的推拉和缩放效果。

近 30 天下载
21
喜欢数
25
Pub 分数
40

安装插件

flutter pub add kenburns

插件介绍

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

kenburns 包使 Flutter 支持 Ken Burns 效果,允许静态图像通过平滑的移动和缩放动画来呈现。此效果通过创造动态视觉吸引力来增强静态图像,常用于相册、演示文稿和叙事类应用。该包可无缝集成到 Flutter 项目中,并支持自定义动画速度和方向。对于希望为图像显示增添电影感而无需复杂视频处理的开发者来说,这是一个理想选择。该包以简洁性和性能为核心设计,可在各种屏幕尺寸和分辨率下良好运行。

适合场景

  • 照片画廊
  • 动画分镜
  • 演示文稿幻灯片
  • 数字标牌
  • 交互式 UI 元素

主要特点

  • 平滑的平移和缩放
  • 可自定义的动画速度
  • 与图像小部件的轻松集成
  • 支持响应式布局
  • 所需最小配置

适合对象

  • 应用开发者
  • UI设计师
  • 内容创作者
  • 教育类应用
  • 媒体丰富的应用程序

使用建议

  • 限制为图像动画
  • 无音频支持
  • 需要仔细调整以获得最佳视觉效果
  • 不适合高频更新
  • 可能会影响低端设备的性能

原始 README

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

KenBurns

The Ken Burns effect is a type of panning and zooming effect used in video production from still imagery.

Wrap your image with a KenBurns widget

Container(
      height: 300,
      child: KenBurns(
        child: Image.network("https://lemag.nikonclub.fr/wp-content/uploads/2017/07/08.jpg", fit: BoxFit.cover,),
      ),
),

screen

Configuration

You can configure KenBurns Widget

KenBurns(
    minAnimationDuration : Duration(milliseconds: 3000),
    maxAnimationDuration : Duration(milliseconds: 10000),
    maxScale : 8,
    child: ...
  });

Multiple images

You can display multiple child in KenBurns with a CrossFade animation

Container(
    height: 300,
    child: KenBurns.multiple(
      childLoop: 3,
      children: [
        Image.network(
          "https://www.photo-paysage.com/?file=pic_download_link/picture&pid=3100",
          fit: BoxFit.cover,
        ),
        Image.network(
          "https://cdn.getyourguide.com/img/location_img-59-1969619245-148.jpg",
          fit: BoxFit.cover,
        ),
        Image.network(
          "https://www.theglobeandmail.com/resizer/vq3O7LI3hvsjTP2N0m9NwU4W3Eg=/1500x0/filters:quality(80)/arc-anglerfish-tgam-prod-tgam.s3.amazonaws.com/public/4ETF3GZR3NA3RDDW23XDRBKKCI",
          fit: BoxFit.cover,
        ),
      ],
    ),
),

Download

pub package

dependencies:
  kenburns: ^1.0.5

License

Copyright 2019 florent37, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

所属分类

源码仓库

使用此插件的项目

暂无相关数据。