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

GitHub 代码仓anees7757/quick_text

快速文本

anees7757/quick_text open-source repository details.

快速文本 项目封面
星标
0
复刻
0
最近推送(UTC)
2024年11月25日
项目状态
未归档

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

QuickText

QuickText is a Flutter package that simplifies text formatting with markdown-like syntax. It allow you to easily apply styles like bold, italic, underline, strikethrough color and links directly within a string, without the need to manually construct complex TextSpan trees. Similiar usage like Text widget.

Key Features

  • Simplified Syntax: Style your text with symbols like **bold**, *italic*, _underline_, ~strikethrough~, [colored](red), [colored](#FF0000) and [link](https://example.com).
  • Enhanced Readability: Clean and easy-to-read code, reducing the verbosity of RichText and TextSpan.
  • Customizable Styles: Includes options for text alignment, overflow, max lines, and more, providing the same flexibility as traditional Flutter text widgets.
  • Built-in Color Support: Apply named colors (like red, blue, etc.) or hex colors (e.g., #FF0000 for red) directly within your text string.
  • Link Support: Easily add links that open in the browser when tapped.

Why Use QuickText?

  • Time-Saving: Quickly format text without the hassle of constructing text spans.
  • User-Friendly: Ideal for developers who want rich text features without the complexity.
  • Rich Functionality: Despite its simplicity, QuickText supports a wide range of text styling options.

Sample Code

Here's how you can use QuickText in your Flutter app:


// Bold

QuickText(
  'This is **bold** text.',
),

// Italic

QuickText(
  'This is *italic* text.',
),

// Underline

QuickText(
  'This is _underline_ text.',
),

// Strikethrough

QuickText(
  'This is ~strikethrough~ text.',
),

// Using named colors

QuickText(
  'This is [colored](red) text.',
),

// Using hex colors

QuickText(
  'This is [colored](#FF0000) text.',
),

// links

QuickText(
  'This is [link](https://example.com).',
),

Installation

Add this to your package's pubspec.yaml file:

dependencies:
  quick_text: ^latest_version

Then run:

flutter pub get

Finally, import the package in your Dart code:

import 'package:quick_text/quick_text.dart';
Muhammad Anees GitHub avatar
GitHub 作者

Muhammad Anees ↗

Flutter Developer

SprinsoftPakistan官方网站 ↗
语言Dart

此仓库发布的插件

使用的依赖

依赖清单 4 项

如何选择适合项目的代码仓?

先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。

  1. 通过仓库名、作者或描述搜索,再按技术分类缩小范围。
  2. 结合星标、复刻与最近推送比较项目;星标反映社区关注,不代表质量保证。
  3. 使用前在 GitHub 核对 README、许可证与 Issues。

来源与维护

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗