update to server location popup

This commit is contained in:
Mohamed Nouffer
2022-10-30 21:43:29 +05:30
parent 2d9f7a9633
commit d16d97f64f
17 changed files with 700 additions and 241 deletions

View File

@ -45,7 +45,8 @@ class DatabaseHelper{
checkedin INTEGER,
cp REAL,
checkin_point REAL,
buy_point REAL
buy_point REAL,
hidden_location INTEGER
)
''');
@ -82,6 +83,14 @@ class DatabaseHelper{
return roglist;
}
Future<Destination> getDestinationById(int id) async {
Database db = await instance.database;
var rog = await db.query('destination', where: "location_id = ${id}");
List<Destination> deslist = rog.isNotEmpty
? rog.map((e) => Destination.fromMap(e)).toList() : [];
return deslist[0];
}
Future<int> deleteRogaining(int rog_id) async {
Database db = await instance.database;
@ -195,7 +204,7 @@ class DatabaseHelper{
dest.toMap(),
conflictAlgorithm: ConflictAlgorithm.replace,
);
print("------ database helper insert ${res}-----------::::::::");
print("------ database helper insert ${dest.toMap()}-----------::::::::");
return res;
}