arif-pandu / text_highlight_rounded

Custom Flutter widget which provides text with rounded highlight border

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Text Highlight Rounded

Description

A custom widget which provides rounded highlighted text, made with painter

Example

example-1
HighlightTextRounded(
    text: "one line only",
    style: TextStyle(
    fontSize: 20,
    color: Colors.black,
),
example-2
HighlightTextRounded(
    text: "and for this\nhighlightText is more\nthan one line\nwithall rounded corners",
    textAlign: TextAlign.center,
    bold: 7,
    isAllCornerRound: true,
    radius: 10,
    markColor: Colors.red[100]!,
    style: const TextStyle(
        fontSize: 25,
        fontWeight: FontWeight.bold,
        color: Colors.purple,
    ),
),
example-3
HighlightTextRounded(
    text: "and for this\nhighlightText is more\nthan one line\nwith basic rounded corner",
    textAlign: TextAlign.right,
    bold: 7,
    radius: 10,
    isAllCornerRound: false,
    markColor: Colors.blue[100]!,
    style: TextStyle(
        fontSize: 25,
        fontWeight: FontWeight.bold,
        color: Colors.blueGrey[800],
    ),
),

Parameter

  • String text
  • TextStyle style;
  • double? maxWidth;
  • double radius;
  • Color markColor;
  • TextAlign textAlign;
  • double bold;
  • bool isAllCornerRound;

About

Custom Flutter widget which provides text with rounded highlight border

License:MIT License


Languages

Language:Dart 74.9%Language:CMake 7.7%Language:Shell 5.8%Language:C 3.1%Language:Objective-C 3.1%Language:Java 2.9%Language:C++ 1.7%Language:Swift 0.8%