5
5
![ coverage] [ coverage_badge ]
6
6
![ pub points] [ pub_points_badge ]
7
7
8
- Whatsapp like text formatting for you!!
9
- This supports the input to be formatted with different formatters.
10
- Text style that will support bold, italic and underline text.
11
-
12
- i.e.
13
- 1 . Bold Text will be wrapped in \* asterisk\*
14
- 2 . Italic Text will be wrapped in \_ underscore\_
15
- 3 . Underline Text will be wrapped in \~ tilde\~
16
- 4 . Bold, Italic and Underline Text will be wrapped in \* asterisk\* \_ underscore\_ \~ tilt\~
8
+ - Make text formatting backend driven (if needed) with one widget!!
9
+ - Whatsapp like formatting with some addons!!
10
+ (input looks something like this)
11
+
12
+ 🌟 Usage 🌟
13
+ BOLD
14
+ → Hello, \* World!*
15
+ ITALIC
16
+ → Hello, \_ World!_
17
+ STRIKETHROUGH
18
+ → Hello, \~ World!~
19
+ UNDERLINE
20
+ → Hello, //World!//
21
+ MONOSPACE
22
+ → Hello, \` World!`
23
+ LINK
24
+ → [ google.com|https://google.com ]   ;
17
25
18
26
19
27
### Preview
20
- <img width =" 488 " alt =" Screenshot 2022-12-13 at 11 56 28 " src =" https://user-images.githubusercontent.com/35066779/207242541-c8bfd00e-0b81-47ce-9bf3-b280e3d63162 .png" >
28
+ <img width =" 488 " alt =" Screenshot 2022-12-13 at 11 56 28 " src =" /preview .png" >
21
29
22
30
23
31
@@ -41,33 +49,30 @@ flutter packages get
41
49
---
42
50
43
51
44
- Usage
52
+ 🌟 Usage 🌟
45
53
46
54
``` dart
47
55
import 'package:typeset/typeset.dart';
48
56
49
57
TypeSet(inputText: 'Hello, *World!*');
50
58
// returns 'World' with bold text
51
59
52
- TypeSet(inputText: 'Hello, _World_! ');
60
+ TypeSet(inputText: 'Hello, _World!_ ');
53
61
// returns 'World' with italic text
54
62
55
- TypeSet(inputText: 'Hello, ~World~! ');
56
- // returns 'World' with underline text
63
+ TypeSet(inputText: 'Hello, ~World!~ ');
64
+ // returns 'World' with strikethrough text
57
65
58
- TypeSet(inputText: '* Hello*, _World_ ~ World~! ');
59
- // returns 'Hello' with bold text, 'World' with italic text and ' World' with underline text
66
+ TypeSet(inputText: 'Hello // World!// ');
67
+ // returns 'World' with underline text
60
68
61
- //TypeSet also has a style property which can be used to style the text
62
- TypeSet(inputText: 'Hello, *World!*', style: TextStyle(color: Colors.red));
63
- // returns 'World' with bold text and red color
69
+ TypeSet(inputText: 'Hello, `World!`');
70
+ // returns 'World' with monospace text
64
71
65
- //OR
72
+ TypeSet(inputText: '[google.com|https://google.com]');
73
+ // returns 'google.com' with link to google.com
66
74
67
- //use the simple extension
68
- 'Hello, *World!*'.typeset();
69
- //this also comes with style
70
- 'Hello, *World!*'.typeset(style: TextStyle(color: Colors.red,),);
75
+ ///TypeSet also has every property which the Text.rich() has, so you can configure accordingly
71
76
72
77
```
73
78
@@ -92,7 +97,7 @@ Please file feature requests and bugs at the [issue tracker][tracker].
92
97
[ tracker ] : https://github.com/rohanjsh/typeset/issues
93
98
[ pub_badge ] : https://img.shields.io/pub/v/typeset.svg
94
99
[ pub_link ] : https://pub.dev/packages/typeset
95
- [ coverage_badge ] : https://img.shields.io/badge/coverage-100%25-green .svg
100
+ [ coverage_badge ] : /coverage_badge .svg
96
101
[ build_badge ] : https://img.shields.io/github/workflow/status/rohanjsh/typeset/ci.svg
97
102
[ pub_points_badge ] : https://img.shields.io/pub/points/typeset
98
103
0 commit comments