refactor set/getByName "peers" "option"

This commit is contained in:
csf
2022-08-08 17:53:51 +08:00
parent 0ef1659b87
commit c5d0628291
15 changed files with 414 additions and 553 deletions

View File

@@ -391,3 +391,10 @@ Future<void> initGlobalFFI() async {
// global shared preference
await Get.putAsync(() => SharedPreferences.getInstance());
}
String translate(String name) {
if (name.startsWith('Failed to') && name.contains(': ')) {
return name.split(': ').map((x) => translate(x)).join(': ');
}
return platformFFI.translate(name, localeName);
}