deleteBookProgress method

Future<bool> deleteBookProgress(
  1. String bookId
)

Implementation

Future<bool> deleteBookProgress(String bookId) async {
  try {
    await isar.writeTxn(() async {
      await isar.bookProgressModels
          .where()
          .filter()
          .bookIdEqualTo(bookId)
          .deleteAll();
    });
    return true;
  } on Exception {
    return false;
  }
}