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

redacted 封面
插件详情v1.0.13

redacted

一个包,可从您自己的小部件自动创建加载小部件。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
3360
喜欢数
563
Pub 分数
140

安装插件

flutter pub add redacted

插件介绍

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

一个 Flutter 包,可根据用户定义的自定义小部件自动生成加载小部件。它通过将任何提供的小部件转换为动态加载状态,简化了创建一致且可重用的加载指示器的过程。非常适合希望以最少样板代码简化 UI 开发的开发者。该包支持所有主要平台,包括 Android、iOS、Web、macOS、Windows 和 Linux,确保跨平台兼容性。在需要在多个屏幕中频繁使用加载状态的应用程序中尤其有用。

适合场景

  • 创建可重用的加载指示器
  • 自动化加载状态生成
  • 增强屏幕间的UI一致性
  • 简化重复的加载小部件代码
  • 跨平台加载组件

主要特点

  • 从自定义设计自动生成加载控件
  • 支持所有 Flutter 平台
  • 所需设置最少
  • 可在多个小部件之间重复使用
  • 与现有用户界面无缝集成

适合对象

  • UI 开发人员
  • Flutter 初学者
  • 频繁加载状态的应用
  • 跨平台项目
  • 注重设计一致性的团队

使用建议

  • 需要一个基础部件来生成加载状态
  • 超出输入小部件的有限自定义
  • 可能会略微增加捆绑大小
  • 依赖于正确的控件结构
  • 不适用于复杂的动画,除非进行额外配置

原始 README

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

A package that automatically generate a loading widget from your own widget.

Usage

First, add redacted as a dependency in your pubspec.yaml file.

dependencies:
  redacted: [Latest-Version]

Don't forget to flutter pub get.

Example

ShoeWidget()
    .redacted(context: context, redact: true)

Styling

You can change the color and the duration of the animation by using RedactedConfiguration:

ShoeWidget().redacted(
  context: context,
  redact: true,
  configuration: RedactedConfiguration(
    animationDuration : const Duration(milliseconds: 800), //default
  ),
)
Unredacted

If you have some widget that you want to keep the same for example you have a title and a value and want to keep the title but redact the value then you can do the following:

SomeWidget()
  .unredacted
Hide

If you want to hide some widget instead of redacting it then you can do the following:

SomeWidget()
  .hide

Current Limitations

The widgets that are currently supported in this pacakge are: Text , Column , Row , Stack , Container , Align , Positioned , Wrap , Image , Center , SizedBox , Padding , Expanded , AspectRatio , InkWell and StatelessWidget.

More widgets will be added in the future.

💖 Support My Work

If you find this package helpful, consider supporting its development:

Buy Me a Coffee

Your support helps me maintain and improve this package. Thank you! ❤️

所属分类

依赖

依赖清单 2 项

源码仓库

使用此插件的项目

暂无相关数据。