DataSourceFirebaseSource<T extends BaseEntityDataModel>.delete constructor

DataSourceFirebaseSource<T extends BaseEntityDataModel>.delete({
  1. required String path,
  2. String? oldImg,
})

Factory constructor for deleting data from Firebase.

The path parameter specifies the Firestore collection path. The oldImg parameter specifies the old image URL to delete.

Implementation

factory DataSourceFirebaseSource.delete({
  required String path,
  String? oldImg,
}) {
  return DataSourceFirebaseSource(path)..deleteUrl = oldImg ?? "";
}