added buypoint images

This commit is contained in:
Mohamed Nouffer
2023-09-14 00:08:53 +05:30
parent 30fea7cf8a
commit aa7b13b76a
5 changed files with 348 additions and 235 deletions

View File

@ -49,7 +49,8 @@ class DatabaseHelper{
checkin_point REAL,
buy_point REAL,
hidden_location INTEGER,
checkin_image TEXT
checkin_image TEXT,
buypoint_image TEXT
)
''');
@ -259,6 +260,20 @@ class DatabaseHelper{
return res;
}
Future<int> updateBuyPoint(Destination destination, String imageUrl)async {
print("---- updating puypint image in db -----");
Database db = await instance.database;
Map<String, dynamic> row = {
"buypoint_image": imageUrl
};
return await db.update(
"destination",
row,
where: 'location_id = ?',
whereArgs: [destination.location_id!]
);
}
Future<int> updateAction(Destination destination, bool checkin)async {
Database db = await instance.database;
int act = checkin == false ? 0 : 1;