queryDataWithFileName static method
Implementation
static Future<ScanModel?> queryDataWithFileName(String fileName) async {
List<Map<String, Object?>> list = await database!
.rawQuery('SELECT * FROM lesntec_scans WHERE id = ?', [fileName]);
if (list.isNotEmpty) {
Map<String, Object?> map = list.first;
ScanModel model = ScanModel.fromJson(map);
return model;
}
return null;
}