update for chech in
This commit is contained in:
@ -39,7 +39,9 @@ class DatabaseHelper{
|
||||
list_order INTEGER,
|
||||
photos TEXT,
|
||||
checkin_radious REAL,
|
||||
auto_checkin INTEGER
|
||||
auto_checkin INTEGER,
|
||||
selected INTEGER,
|
||||
checkedin INTEGER
|
||||
)
|
||||
''');
|
||||
}
|
||||
@ -85,6 +87,20 @@ class DatabaseHelper{
|
||||
return res;
|
||||
}
|
||||
|
||||
Future<int> updateAction(Destination destination, bool checkin)async {
|
||||
Database db = await instance.database;
|
||||
int act = checkin == false ? 0 : 1;
|
||||
Map<String, dynamic> row = {
|
||||
"checkedin": act
|
||||
};
|
||||
return await db.update(
|
||||
"destination",
|
||||
row,
|
||||
where: 'location_id = ?',
|
||||
whereArgs: [destination.location_id]
|
||||
);
|
||||
}
|
||||
|
||||
// Future<int?> getPending() async{
|
||||
// Database db = await instance.database;
|
||||
// return await Sqflite.firstIntValue(await db.rawQuery("SELECT COUNT(*) FROM incidents"));
|
||||
|
||||
Reference in New Issue
Block a user