add json encode pertty
This commit is contained in:
parent
81e7eb2f98
commit
ce74d1237b
1 changed files with 6 additions and 0 deletions
|
|
@ -1,3 +1,5 @@
|
|||
import 'dart:convert';
|
||||
|
||||
String toPascal(String raw) {
|
||||
return '${raw[0].toUpperCase()}${raw.substring(1).toLowerCase()}';
|
||||
}
|
||||
|
|
@ -15,3 +17,7 @@ String getTime() {
|
|||
var now = DateTime.now();
|
||||
return '${now.hour.toString().padLeft(2, '0')}:${now.minute.toString().padLeft(2, '0')}:${now.second.toString().padLeft(2, '0')}';
|
||||
}
|
||||
|
||||
String jsonPerttyEncode(Object? object) {
|
||||
return JsonEncoder.withIndent(' ').convert(object);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue