updateNotification method

Future<int> updateNotification(
  1. Notif obj
)

Implementation

Future<int> updateNotification(Notif obj) async {
  Database db = await (this.database as FutureOr<Database>);
  Map<String, dynamic> map = obj.toJson();
  map["isRead"] = obj.isRead ? 1 : 0;
  return await db.update('notification', map,
    where: "id = ?",
    whereArgs: [obj.id],
  );
}