搜尋套件、儲存庫與 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.

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。