getSensingData static method
Implementation
static Future<String?> getSensingData(String key) async {
print("[GeigerToolboxAPIs] Getting sensing data: $key");
// Get a reference to the database.
final db = await getDatabaseInstance();
// Get a reference to the database.
List<Map> maps = await db.query(GeigerConfigs.DB_SENSING_DATA_TABLE,
columns: ['value'], where: 'key=?', whereArgs: [key]);
if (maps.length > 0) {
final data = maps.first['value'];
print("[GeigerToolboxAPIs] return data: $data");
return data;
} else {
return null;
}
}