Skip to content

Instantly share code, notes, and snippets.

@Rahiche
Created December 11, 2018 13:56
Show Gist options
  • Save Rahiche/aa893d0b95166ff51fca2b443f74208e to your computer and use it in GitHub Desktop.
Save Rahiche/aa893d0b95166ff51fca2b443f74208e to your computer and use it in GitHub Desktop.
blockOrUnblock(Client client) async {
final db = await database;
Client blocked = Client(
id: client.id,
firstName: client.firstName,
lastName: client.lastName,
blocked: !client.blocked);
var res = await db.update("Client", blocked.toMap(),
where: "id = ?", whereArgs: [client.id]);
return res;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment