update for travelmode change bug fixes
This commit is contained in:
@ -68,6 +68,12 @@ class DatabaseHelper{
|
||||
return ret;
|
||||
}
|
||||
|
||||
Future<bool>isAlreadyAvailable(int location_id) async{
|
||||
Database db = await instance.database;
|
||||
var dest = await db.delete('destination', where: "location_id = ${location_id}");
|
||||
return dest > 0 ? true : false;
|
||||
}
|
||||
|
||||
Future<int> insertDestination(Destination dest) async {
|
||||
Database db = await instance.database;
|
||||
int res = await db.insert(
|
||||
@ -75,6 +81,7 @@ class DatabaseHelper{
|
||||
dest.toMap(),
|
||||
conflictAlgorithm: ConflictAlgorithm.replace,
|
||||
);
|
||||
print("------ database helper insert ${res}-----------::::::::");
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user