update
This commit is contained in:
@ -83,12 +83,12 @@ class DatabaseHelper{
|
||||
return roglist;
|
||||
}
|
||||
|
||||
Future<Destination> getDestinationById(int id) async {
|
||||
Future<List<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];
|
||||
return deslist;
|
||||
}
|
||||
|
||||
|
||||
@ -204,7 +204,7 @@ class DatabaseHelper{
|
||||
dest.toMap(),
|
||||
conflictAlgorithm: ConflictAlgorithm.replace,
|
||||
);
|
||||
print("------ database helper insert ${dest.toMap()}-----------::::::::");
|
||||
//print("------ database helper insert ${dest.toMap()}-----------::::::::");
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -218,7 +218,7 @@ class DatabaseHelper{
|
||||
"destination",
|
||||
row,
|
||||
where: 'location_id = ?',
|
||||
whereArgs: [destination.location_id]
|
||||
whereArgs: [destination.location_id!]
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user