2021-06-01 23:03:54 +07:00
|
|
|
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}!';
|
2021-06-17 15:25:40 +07:00
|
|
|
var result1 = TextFormatter(text1).format(args: ['Sambo', 'Chea']);
|
|
|
|
var result2 = TextFormatter(text2).decorate(params: {
|
2021-06-01 23:03:54 +07:00
|
|
|
'firstName': 'Sambo',
|
|
|
|
'lastName': 'Chea',
|
|
|
|
});
|
|
|
|
|
|
|
|
print('Result 1 => $result1');
|
|
|
|
print('Result 2 => $result2');
|
|
|
|
}
|