deleteDataItem method
Deletes a data item from Firebase.
Deletes the data item with the specified id from Firestore.
If deleteUrl is not null, deletes the associated file.
Returns a Result indicating success or an error.
Implementation
@override
Future<Result<RemoteBaseModel, RemoteBaseModel>> deleteDataItem(
String id) async {
try {
await _fireStoreAction.deleteDataCloudFirestorWithdeletFile(
path: _path, id: id, oldurl: deleteUrl);
return Result.data(RemoteBaseModel(data: "done"));
} on Exception catch (e) {
return Result.error(RemoteBaseModel(message: e.toString()));
}
}