deleteById method

Future<Result> deleteById(
  1. String id
)

Implementation

Future<Result> deleteById(String id) async {
  try {
    assert(StringUtils.instance.isNotBlank(id));

    Logger.log(
        log: Log.i(
            _buildMessage('Attempting to delete an object with id $id')));
    await _collectionPath!.doc(id).delete();

    return Result.success();
  } catch (e, stacktrace) {
    return _getErrorLog(
      msg: e.toString(),
      stacktrace: stacktrace,
    );
  }
}