搜索插件、代码仓与 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

所属分类

源码仓库

使用此插件的项目

暂无相关数据。