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

插件详情v1.1.1

tailwind_standards

适用于 Flutter 的 Tailwind CSS。颜色、尺寸、权重以及用于样式化应用程序的 TText 小部件。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
19
喜欢数
28
Pub 分数
150

安装插件

flutter pub add tailwind_standards

插件介绍

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

Tailwind_standards 将 Tailwind CSS 的实用优先样式方法引入 Flutter,提供了一套预定义的类,用于颜色、尺寸和字体权重。它包含一个 TText 小部件,可使用简洁、易读的语法简化文本样式设置。专为熟悉 Tailwind 的开发者设计,可在多个平台上实现快速 UI 开发。该包支持 Android、iOS、Web、macOS、Windows 和 Linux,非常适合需要一致且可扩展的设计模式的跨平台应用,而无需编写自定义样式。

适合场景

  • 快速UI原型设计
  • 跨平台应用样式
  • 一致的设计系统
  • 简化文本样式
  • 减少样板代码

主要特点

  • 类似 Tailwind 的实用程序类
  • TText 小部件用于样式化文本
  • 颜色、大小和权重预设
  • 多平台支持
  • 最少的自定义 CSS
  • 简洁、可读性强的样式语法

适合对象

  • 熟悉 Tailwind CSS 的 Flutter 开发人员
  • 注重设计一致性的团队
  • 需要快速用户界面迭代的项目
  • Web和移动应用开发
  • 希望减少 CSS 冗余的开发者

使用建议

  • 仅限基本样式实用工具
  • 不是完整的 CSS 替代方案
  • 需要学习新的小部件约定
  • 最适合简单到中等的用户界面
  • 不如自定义样式方法灵活

原始 README

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

Tailwind Standards

Style your Flutter app with Tailwind CSS. Colors, Sizes, Weights and a TText widget that takes classes. All in the same structure as you would use Tailwind CSS in HTML.

Features

  • TColor: Use all tailwind default colors
  • TText: An extension on the Flutter Text widget that can be styled in the same way as a class in HTML.
  • TSize: All tailwind default sizes are easily accessible
  • TWeight: Use the naming convention of Tailwind CSS for weights

Getting started

To install the package run the following command.

flutter pub add tailwind_standards

Usage

TColor

TColor has all the default colors that Tailwind CSS offers. You can access every color in the following way.

Color tcolor = TColor.slate500;

Alt text

TText

TText is an extension of the Text widget from Flutter. It takes classes in the same structure as when you use Tailwind CSS for HTML.

const TText(
    'TText widget from tailwind_standards!',
    props: 'text-xs text-gray-500 text-center font-bold',
),
TSize

TSize has all the default Tailwind CSS sizes that are mostly used in padding, margin, etc.

int tsize = TSize.lg;
TWeight

TWeight translates the Tailwind CSS naming convention to the font weights used in Flutter.

FontWeight tweight = TWeight.semiBold;

Additional information

Feedback is always welcome! If you see improvements or if something comes to your attention, please let me know or create a pull request.

所属分类

源码仓库

使用此插件的项目

暂无相关数据。