deleteCategory method

Future<void> deleteCategory(
  1. String categoryId
)

Deletes the category. Its templates stay and are listed without a category until they are moved.

Implementation

Future<void> deleteCategory(String categoryId) async {
  await store.delete(PrintCollection.categories, categoryId);
  _categories = _categories.where((entry) => entry.id != categoryId).toList();
  notifyListeners();
}