updateState method

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

Update an existing state value

Implementation

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

  return _updateDocument('activities/state', params, state);
}