typeset 0.1.0+13 copy "typeset: ^0.1.0+13" to clipboard
typeset: ^0.1.0+13 copied to clipboard

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

TypeSet #

License: MIT style: very good analysis pub package coverage build

This supports the input from backend to be formatted with different formatters. Text style that will support bold, italic and underline text coming from the server. The implementation will be same as we see on WhatsApp.

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:

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

Features and bugs #

Please file feature requests and bugs at the issue tracker.

45
likes
0
pub points
79%
popularity

Publisher

verified publisherrohanjsh.dev

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

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on typeset