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

scanning_effect 封面
插件详情v1.0.11

scanning_effect

使用 CustomPainter 实现可自定义边框的环绕相机视图扫描效果。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
440
喜欢数
42
Pub 分数
140

安装插件

flutter pub add scanning_effect

插件介绍

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

scanning_effect 包为相机视图提供可自定义的扫描动画,非常适合二维码和文档扫描应用。通过 CustomPainter,它在相机画面周围包裹带有动画边框,模拟扫描效果。开发者可以调整边框颜色、粗细和动画速度,以匹配其应用的设计。该包支持 Android、iOS、Web、macOS、Windows 和 Linux 多个平台,适用于跨平台开发。它通过在扫描过程中提供视觉反馈来提升用户体验。

适合场景

  • 二维码扫描界面
  • 文档扫描仪用户界面
  • 移动库存跟踪应用
  • 条形码读取工具
  • 交互式相机叠加
  • 数字收据捕获

主要特点

  • 可自定义边框样式
  • 动画扫描效果
  • 跨平台兼容性
  • 相机视图集成
  • 可配置的动画速度
  • 可扩展的,带有 CustomPainter

适合对象

  • 开发扫描应用的开发者
  • 寻求动态摄像机效果的UI设计师
  • 跨平台移动应用
  • 需要实时扫描反馈的应用程序
  • 使用基于摄像头输入的项目

使用建议

  • 需要相机访问权限
  • 可能会影响低端设备的性能
  • 自定义需要了解 CustomPainter
  • 仅限视觉效果,不包括扫描逻辑
  • 不适用于非相机使用场景

原始 README

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

Scanning Effect

License: MIT

Scanning Effect to wrap around the camera

Demo Image Alt Text

Demo Code

Wrap the ScanningEffect widget around your widget

@override
Widget build(BuildContext context) {
  return ScanningEffect(
    scanningColor: Colors.red,
    borderLineColor: Colors.green,
    delay: Duration(seconds: 1),
    duration: Duration(seconds: 2),
    child: Container(
      child: SizedBox(),
    ),
  );
}

You can set the custom config base on these param:

  • scanningColor: The color of the scanning animation
  • borderLineColor: The color of the border line
  • scanningHeightOffset: The percent of scanning animation with the view height
  • delay: The delay between each animation
  • duration: The length of time this animation should last.
  • scanningLinePadding: The padding of the scanning animation

所属分类

源码仓库

使用此插件的项目

暂无相关数据。