This involves two steps:

Convert the Dog into a Map.

Use a where clause to ensure you update the correct Dog.

Warning:
  Always use whereArgs to pass arguments to a where statement.
  This helps safeguard against SQL injection attacks.

Do not use string interpolation, such as where: "id = ${dog.id}"!

8. Delete a Dog from the database

In addition to inserting and updating information about Dogs,
you can also remove dogs from the database. To delete data,
use the delete() method from the sqflite library.

In this section, create a function that takes an id and deletes the dog with
a matching id from the database. To make this work, you must provide a where
clause to limit the records being deleted.

Example

To run the example:

Create a new Flutter project.

Add the sqflite and path packages to your pubspec.yaml.