refactor: using string extension

This commit is contained in:
Rongjian Zhang
2020-01-31 14:31:24 +08:00
parent 05a4ffeeb8
commit db92210659
6 changed files with 19 additions and 26 deletions

View File

@@ -189,12 +189,6 @@ class RouterScreen {
final dateFormat = DateFormat.yMMMMd();
String convertBase64ToString(String input) {
if (input == null) return null;
final bits = base64.decode(input.replaceAll('\n', ''));
return utf8.decode(bits);
}
int sortByKey<T>(T key, T a, T b) {
if (a == key && b != key) return -1;
if (a != key && b == key) return 1;