delete method

  1. @override
Future<String?> delete(
  1. String path
)
override

Deletes data at the specified path.

The path parameter identifies the location of the data to delete.

Returns a Future that completes when the delete operation is finished. If the delete operation fails, the future will complete with an error.

Implementation

@override
Future<String?> delete(String path) async {
  try {
    await datasource.ref(path).remove();
    return null;
  } catch (e) {
    return e.toString();
  }
}