parse_text

A Flutter package that simply allows you to detect multiple types i.e. email, mobile, urls, etc. It is highly Customizable in terms of size, color, style, etc for each detected type of text and Simple to use.

Import

dependencies:
  parse_text: 0.0.8

Text Format for Detection

URL : Automatically detects when an URL is included in the text and navigate you to Browser

Email : Automatically detects when an email is included in the text and navigate you to Email

Mobile : Automatically detects when a mobile number is included in the text

Bold : enclose your text in '*' e.g: *Bold Text* , result => Bold

Italic : enclose your text in '_' e.g: _Bold Text_ , result => Italic

Cross : enclose your text in '~' e.g: ~Bold Text~ , result => Crossed

Simple use

You can use ParseText as Text Widget

ParseText(
  size: 16,
  text: "Add your Sample Text here"
)

Beautify Detected Texts

You can use multiple text beautification options with detected text formats.

ParseText(
  size: 16,
  text: "Add your Sample Text here"
  emailColor: Colors.red,
  emailSize: 18,
  urlStyle: FontStyle.italic,
)

Parameters for undetected text

parameterdescriptiondefault
sizeThe Size of Text which is supposed to parse and Displayed as Text Widgetrequired
textThe Text which is supposed to parserequired
colorThe Color of UnDetected TextColor(0xFF424242)
wtThe FontWeight of UnDetected TextFontWeight.normal
alignThe Alignment of UnDetected TextTextAlign.start
maxLinemaxLines of UnDetected Textinfinite
styleFontStyle of UnDetected TextFontStyle.normal

Parameters for detected email text

parameterdescriptiondefault
emailColorThe Color of text detected as EmailColor.blue
emailFWThe FontWeight of text detected as EmailFontWeight.w600
emailSizeThe Size of text detected as Emailsize (same as UnDetected Text)
emailStyleThe FontStyle of text detected as EmailFontStyle.normal

Parameters for detected mobile text

parameterdescriptiondefault
mobColorThe Color of text detected as MobileColor.blue
mobFWThe FontWeight of text detected as MobileFontWeight.w600
mobSizeThe Size of text detected as Mobilesize (same as UnDetected Text)
mobStyleThe FontStyle of text detected as MobileFontStyle.normal

Parameters for detected url text

parameterdescriptiondefault
urlColorThe Color of text detected as URLColor.blue
urlFWThe FontWeight of text detected as URLFontWeight.w600
urlSizeThe Size of text detected as URLsize (same as UnDetected Text)
urlStyleThe FontStyle of text detected as URLFontStyle.normal

Parameters for detected bold text

parameterdescriptiondefault
boldColorThe Color of text detected as BoldColor(0xFF424242)
boldSizeThe Size of text detected as Boldsize (same as UnDetected Text)

Parameters for detected italic text

parameterdescriptiondefault
italicColorThe Color of text detected as ItalicColor(0xFF424242)
italicSizeThe Size of text detected as Italicsize (same as UnDetected Text)

Parameters for detected email text

parameterdescriptiondefault
crossColorThe Color of text detected as CrossColor(0xFF424242)
crossSizeThe Size of text detected as Crosssize (same as UnDetected Text)

Libraries

constants
extractor
parse_text
recognizer
Stack