listDatabases method
Lists all named databases in the environment.
Returns a list of database names that have been created. The default unnamed database is not included in this list.
Example:
final databases = await db.listDatabases();
for (final dbName in databases) {
print('Found database: $dbName');
}
Implementation
Future<List<String>> listDatabases() async {
final txn = await txnStart();
try {
final names = await _getDbNames(txn);
await txnCommit(txn);
return names;
} catch (e) {
await txnAbort(txn);
rethrow;
}
}