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

animated_loading_border 封面
插件详情v0.0.2

animated_loading_border

一个包,可让我们以现代化的方式在加载控件时显示动画边框作为占位符,易于自定义且开箱即用。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
1810
喜欢数
88
Pub 分数
150

安装插件

flutter pub add animated_loading_border

插件介绍

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

一个 Flutter 包,提供一种动画边框作为加载占位符,可在小部件加载期间提供现代且可自定义的视觉指示器。它可无缝集成到多个平台的用户界面中,使开发者能够轻松应用带有平滑动画的动态边框。该包设计简洁,设置简单,同时支持广泛的自定义选项,如颜色、粗细和动画速度。非常适合在异步操作期间提升用户体验。

适合场景

  • 加载状态指示器
  • 列表中的占位符小部件
  • 表单提交反馈
  • 图像或数据加载状态
  • 交互式组件预览

主要特点

  • 可自定义的边框颜色和宽度
  • 平滑的动画边框效果
  • 跨平台兼容性
  • 与现有小部件的轻松集成
  • 可配置的动画速度和持续时间

适合对象

  • 寻求现代加载视觉效果的开发者
  • 专注于微交互的UI/UX设计师
  • 频繁异步数据加载的应用
  • 需要轻量级占位符的项目
  • 优先考虑一致的加载反馈

使用建议

  • 仅限基于边框的加载指示器
  • 可能需要额外的样式才能实现复杂的布局
  • 动画性能取决于设备功能
  • 不适用于非边界加载模式
  • 需要手动处理加载状态逻辑

原始 README

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

animated_loading_border

Flutter Website Dart Website MIT License

Key Definition

  • A package that gives us a modern way to show animated border as a placeholder while loading our widget with easy customization and ready to use.

Preview

animated_loading_border animated_loading_border

Basic Usage

Import it to your project file

import 'package:animated_loading_border/animated_loading_border.dart';

And add it in its most basic form like it:

AnimatedLoadingBorder(
  child: Container(),
  controller: (animationController) {
     // Here we get animationController     
  },
);
Required parameters of AnimatedLoadingBorder

Parameter Description
Widget child The child contained by the AnimatedLoadingBorder
Optional parameters of AnimatedLoadingBorder

Parameter Default Description
ValueChanged? controller -- Callback that gives the AnimationController of the AnimatedLoadingBorder
Duration duration Duration(seconds: 4) Defines the animation duration
double cornerRadius 0.0 Defines the corner radius of the border
double borderWidth 1 Defines the width of the border
Color borderColor Colors.black Defines the color of the border
Color trailingBorderColor Colors.black Defines the color for the trailing part of the border
EdgeInsets padding EdgeInsets.zero Used to add child widget padding
bool startWithRandomPosition true Used to set starting position of SweepGradient
bool isTrailingTransparent true Used to set starting color of SweepGradient
Guideline for contributors

  • Contribution towards my repository is always welcome, i request contributors to create a pull request for development.
Guideline to report an issue/feature request

It would be great for me if the reporter can share the below things to understand the root cause of the issue.

  • Library version
  • Code snippet
  • Logs if applicable
  • Device specification like (Manufacturer, OS version, etc)
  • Screenshot/video with steps to reproduce the issue
  • Library used

LICENSE!

animated_loading_border is MIT-licensed.

所属分类

源码仓库

使用此插件的项目

暂无相关数据。