deleteFromCollection<T> static method
Delete an item of a collection using a index
and the collection key
.
Implementation
static Future deleteFromCollection<T>(int index,
{required String key}) async {
List<T> collection = await readCollection<T>(key);
if (collection.isEmpty) return;
collection.removeAt(index);
await saveCollection<T>(key, collection);
}