Search packages, repositories and app categories

GitHub repositoryanees7757/quick_text

quick_text

anees7757/quick_text open-source repository details.

quick_text project cover
Stars
0
Forks
0
Last push (UTC)
Nov 25, 2024
Project status
Active

Original README

English project snapshot. Visit GitHub for the latest content.

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 author

Muhammad Anees ↗

Flutter Developer

SprinsoftPakistanOfficial website ↗
LanguagesDart

Packages published by this repository

Dependencies used

Dependency list 4 items

How do I choose a repository?

Start with your use case, compare repository activity, and check the original project before adopting it.

  1. Search by repository name, owner or description, then narrow the results by topic.
  2. Compare stars, forks and recent pushes. Stars show community interest, not a guarantee of quality.
  3. Read the README, license and issues on GitHub before using a project.

Sources and maintenance

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

GitHub Docs — About repositories ↗