Task: Add text formatter functions and updated for configurable from the latest

functions with future and async support and add tests and examples
This commit is contained in:
2021-06-01 23:03:54 +07:00
parent 65e6aac985
commit 7ec5118598
12 changed files with 202 additions and 5 deletions

View File

@@ -0,0 +1,14 @@
import 'package:cubetiq/text.dart';
void main(List<String> args) {
var text1 = 'Hello, {0}, then do this it by {1}!';
var text2 = 'Hello, {firstName}, then do this it by {lastName}!';
var result1 = TextFormatter(text1).format(['Sambo', 'Chea']);
var result2 = TextFormatter(text2).decorate({
'firstName': 'Sambo',
'lastName': 'Chea',
});
print('Result 1 => $result1');
print('Result 2 => $result2');
}