getAllKeys method

Future<VoltronArray?> getAllKeys()
override

Implementation

Future<VoltronArray?> getAllKeys() async {
  var database = await _sqLiteHelper.getDatabase();
  if (database == null) {
    throw 'Database Error';
  }
  try {
    var resultList = VoltronArray();
    dynamic result =
        await database.query(_sqLiteHelper.getTableName(), columns: [SQLiteHelper.kColumnKey]);
    for (Map<String, dynamic> keyMap in result) {
      resultList.push(keyMap[SQLiteHelper.kColumnKey]);
    }
    return resultList;
  } catch (e) {
    LogUtils.e('flutterRender', e.toString());
    return null;
  } finally {}
}