diff --git a/lib/core/storage/local_db.dart b/lib/core/storage/local_db.dart index 50180aeb..bfac6e3e 100644 --- a/lib/core/storage/local_db.dart +++ b/lib/core/storage/local_db.dart @@ -327,11 +327,8 @@ class LocalDb { Future> getConnections() async { final db = await _open(); final rows = await db.query('connections', orderBy: 'sort_order ASC, name ASC'); - final out = []; - for (final m in rows) { - out.add(await _hydrateConnection(ConnectionRow.fromMap(m))); - } - return out; + final futures = rows.map((m) => _hydrateConnection(ConnectionRow.fromMap(m))); + return Future.wait(futures); } static Future _hydrateConnection(ConnectionRow row) async {