tableColumns method

Future<List<String?>> tableColumns(
  1. String tableName
)

Implementation

Future<List<String?>> tableColumns(String tableName) async {
  try {
    final schema = await this._db!.rawQuery("PRAGMA table_info('$tableName');");
    return schema.map((e) => e['name']) as FutureOr<List<String?>>;
  } catch (e) {
    print(e);
  }
  return [];
}