fix: Ignore empty results on root installed apps listing

This commit is contained in:
Alberto Ponces 2022-09-18 02:41:11 +01:00
parent ae801a2918
commit d0fb6ac3c0

View File

@ -58,7 +58,9 @@ class RootAPI {
cmd: 'ls "$_managerDirPath"', cmd: 'ls "$_managerDirPath"',
); );
if (res != null) { if (res != null) {
return res.split('\n').map((pack) => pack.trim()).toList(); List<String> apps = res.split('\n');
apps.removeWhere((pack) => pack.isEmpty);
return apps.map((pack) => pack.trim()).toList();
} }
} on Exception { } on Exception {
return List.empty(); return List.empty();