listTables method
Returns the names of all tables present in the database.
Implementation
List<String> listTables() {
_checkOpen();
final tables = <String>[];
final callable = NativeCallable<_TableCallbackNative>.isolateLocal((
Pointer<Char> namePtr,
Pointer<Void> _,
) {
tables.add(namePtr.cast<Utf8>().toDartString());
});
try {
ns_database_iterate_tables(_db, callable.nativeFunction, nullptr);
} finally {
callable.close();
}
return tables;
}