deleteState method

  1. @override
Future<LRSResponse> deleteState(
  1. StateDocument state
)
override

Remove a state value

Implementation

@override
Future<LRSResponse> deleteState(StateDocument state) async {
  final params = {
    'stateId': state.id,
    'activityId': state.activity!.id.toString(),
    'agent': _agentToString(state.agent!),
  };
  if (state.registration != null) {
    params['registration'] = state.registration;
  }
  return await _deleteDocument('activities/state', params);
}