搜尋套件、儲存庫與 APP 分類

neonpen 封面
套件詳情v2.0.5

neonpen

一個為文字添加霓虹筆風格的 Flutter 套件。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
23
喜歡數
12
Pub 分數
140

安裝套件

flutter pub add neonpen

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

NeonPen 是一個 Flutter 套件,讓開發者能夠為文字應用充滿活力的霓虹筆風格效果,創造出引人注目的視覺展示。它透過發光輪廓和動態顏色變化增強文字,非常適合現代使用者介面與互動式應用程式。此套件支援多個平台,包括 Android、iOS、Web、macOS、Windows 與 Linux,確保跨裝置的一致樣式。僅需透過 pub 命令進行極簡設定,即可順暢整合至現有的 Flutter 項目中。完美適用於為標題、按鈕或任何需要突出美學的文本元素增添風采。

適用情境

  • 在應用程式中添加發光文字效果
  • 建立視覺上吸引人的使用者介面元件
  • 增強遊戲或儀表板介面
  • 設計促銷或行銷畫面
  • 實現動畫文字標籤
  • 透過視覺吸引力提升使用者參與度

主要特色

  • 發光霓虹文字效果
  • 動態顏色過渡
  • 跨平台相容性
  • 與 pub 的簡單整合
  • 可自訂的光暈強度
  • 支援所有主要的Flutter平台

適合對象

  • 尋求視覺衝擊力的UI/UX設計師
  • 開發遊戲或儀表板的開發者
  • 專注於現代美學的應用程式創作者
  • 同時開發網頁和行動應用的團隊
  • 前端開發人員想要快速的動畫效果

使用建議

  • 可能影響低階裝置的效能
  • 需要仔細管理對比度以確保可讀性
  • 最適合短文本元素
  • 不建議用於正文字體或對可存取性至關重要的內容
  • 顏色選擇應考慮螢幕亮度與觀看條件

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

Neonpen

A Flutter package to add a Neon Pen style on text.
There are options for color, opacity, ziggle, double layer and so on.

Preview

Installation

Add neonpen: ^2.0.5 to your pubspec.yaml dependecies. And import it:

import 'package:neonpen/neonpen.dart';

How to use

Simply add a Animation List widget with required params.

Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Neonpen(
              text: Text(
                'Hello World!',
                style: TextStyle(
                  fontSize: 15,
                ),
              ),
              color: Colors.red,
              opacity: 0.3,
              emphasisWidth: 5,
              emphasisOpacity: 0.3,
              emphasisAngleDegree: 0.5,
              enableLineZiggle: true,
              lineZiggleLevel: 0,
              isDoubleLayer: false,
            ),
            SizedBox(height: 30),
            Neonpen(
              text: Text(
                'Hello World!',
                style: TextStyle(
                  fontSize: 15,
                ),
              ),
              color: Colors.yellow,
              padding: EdgeInsets.symmetric(vertical: 5, horizontal: 15),
              opacity: 0.3,
              disableEmphasis: true,
              lineZiggleLevel: 1,
              isDoubleLayer: false,
            ),
            SizedBox(height: 30),
            Neonpen(
              text: Text(
                'Hello World!',
                style: TextStyle(
                  fontSize: 15,
                ),
              ),
              color: Colors.orange,
              padding: EdgeInsets.only(
                top: -10,
                left: 5,
                right: 5,
              ),
              opacity: 0.3,
              disableEmphasis: true,
              enableLineZiggle: true,
              lineZiggleLevel: 1,
              isDoubleLayer: false,
            ),
            SizedBox(height: 30),
            Neonpen(
              text: Text(
                'Hello World!',
                style: TextStyle(
                  fontSize: 15,
                ),
              ),
              color: Colors.grey,
              padding: EdgeInsets.symmetric(vertical: 5, horizontal: 15),
              opacity: 0.7,
              emphasisWidth: 5,
              emphasisOpacity: 0.5,
              emphasisAngleDegree: 0.5,
              enableLineZiggle: true,
              lineZiggleLevel: 1,
              isDoubleLayer: false,
            ),
            SizedBox(height: 30),
            Neonpen(
              text: Text(
                'Hello World!',
                style: TextStyle(
                  fontSize: 15,
                ),
              ),
              color: Colors.blue,
              padding: EdgeInsets.symmetric(vertical: 5, horizontal: 15),
              opacity: 0.3,
              emphasisWidth: 15,
              emphasisOpacity: 0.3,
              emphasisAngleDegree: 2,
              enableLineZiggle: true,
              lineZiggleLevel: 1,
              isDoubleLayer: false,
            ),
            SizedBox(height: 30),
            Neonpen(
              text: Text(
                'Hello World!',
                style: TextStyle(
                  fontSize: 15,
                ),
              ),
              color: Colors.purple,
              padding: EdgeInsets.symmetric(vertical: 5, horizontal: 15),
              opacity: 0.3,
              emphasisWidth: 10,
              emphasisOpacity: 0.3,
              emphasisAngleDegree: 2,
              enableLineZiggle: true,
              lineZiggleLevel: 2,
              isDoubleLayer: false,
            ),
            SizedBox(height: 30),
            Neonpen(
              text: Text(
                'Hello World!',
                style: TextStyle(
                  fontSize: 15,
                ),
              ),
              color: Colors.green,
              padding: EdgeInsets.symmetric(vertical: 5, horizontal: 20),
              opacity: 0.3,
              emphasisWidth: 5,
              emphasisOpacity: 0.3,
              emphasisAngleDegree: 0.5,
              enableLineZiggle: true,
              lineZiggleLevel: 1,
              isDoubleLayer: true,
            ),
            SizedBox(height: 30),
            Neonpen(
              text: Text(
                'Hello World!',
                style: TextStyle(
                  fontSize: 15,
                ),
              ),
              color: Colors.lime,
              padding: EdgeInsets.symmetric(vertical: 5, horizontal: 20),
              opacity: 0.3,
              emphasisWidth: 5,
              emphasisOpacity: 0.3,
              emphasisAngleDegree: 2,
              enableLineZiggle: true,
              lineZiggleLevel: 1,
              isDoubleLayer: true,
            ),
            SizedBox(height: 30),
            Neonpen(
              text: Text(
                'Hello World!',
                style: TextStyle(
                  fontSize: 15,
                ),
              ),
              color: Colors.amber,
              padding: EdgeInsets.symmetric(vertical: 10, horizontal: 25),
              opacity: 0.3,
              emphasisWidth: 5,
              emphasisOpacity: 0.3,
              emphasisAngleDegree: 0.5,
              enableLineZiggle: true,
              lineZiggleLevel: 1,
              isDoubleLayer: true,
            ),
            SizedBox(height: 30),
            Neonpen(
              text: Text(
                'Hello World!',
                style: TextStyle(
                  fontSize: 15,
                ),
              ),
              color: Colors.indigo,
              padding: EdgeInsets.symmetric(vertical: 10, horizontal: 25),
              opacity: 0.3,
              emphasisWidth: 8,
              emphasisOpacity: 0.1,
              emphasisAngleDegree: 0.8,
              enableLineZiggle: true,
              lineZiggleLevel: 1,
              isDoubleLayer: true,
            ),
            SizedBox(height: 30),
          ],
        ),
      ),
    );
}

Properties

Attribute Data type Description Default
text Text A Text widget that will be covered by neonpen effect -
color Color A color of neonpen style -
opacity double An opacity of neonpen style 0.5
padding EdgeInsets A padding of between Text widget and neonpen style EdgeInsets.symmetric(horizontal: 5)
disableEmphasis bool A bool value to disable emphasis effect false
emphasisWidth double The start and end's neonpen style thickness 5.0
emphasisOpacity double An opacity of the start and end's neonpen style 0.55
emphasisAngleDegree double An angle degree of the start and end's neonpen style 1
enableLineZiggle bool Add a ziggle style to neonpen line false
lineZiggleLevel double A level of ziggle style to neonpen line 1
isDoubleLayer bool Add a two neopen style on Text widget false

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。