TypeSet

style: very good analysis pub package coverage pub points

Whatsapp like text formatting for you!! This supports the input to be formatted with different formatters. Text style that will support bold, italic and underline text.

i.e.

  1. Bold Text will be wrapped in *asterisk*
  2. Italic Text will be wrapped in _underscore_
  3. Underline Text will be wrapped in ~tilde~
  4. Bold, Italic and Underline Text will be wrapped in *asterisk* _underscore_ ~tilt~

Preview

Screenshot 2022-12-13 at 11 56 28

Installation 💻

❗ In order to start using typeset you must have the Flutter SDK installed on your machine.

Add typeset to your pubspec.yaml:

dependencies:
  typeset: #latest

Install it:

flutter packages get

Usage

import 'package:typeset/typeset.dart';

TypeSet(inputText: 'Hello, *World!*');
// returns 'World' with bold text

TypeSet(inputText: 'Hello, _World_!');
// returns 'World' with italic text

TypeSet(inputText: 'Hello, ~World~!');
// returns 'World' with underline text

TypeSet(inputText: '*Hello*, _World_ ~World~!');
// returns 'Hello' with bold text, 'World' with italic text and 'World' with underline text

//TypeSet also has a style property which can be used to style the text
TypeSet(inputText: 'Hello, *World!*', style: TextStyle(color: Colors.red));
// returns 'World' with bold text and red color

//OR

//use the simple extension
'Hello, *World!*'.typeset();
//this also comes with style
'Hello, *World!*'.typeset(style: TextStyle(color: Colors.red,),);

Features and bugs

Please file feature requests and bugs at the issue tracker.

Libraries

typeset
This supports the input from backend to be formatted with different formatters