bindSurveyProgress method

void bindSurveyProgress(
  1. int token,
  2. ({int? abandonedAtItem, int? answeredCount}) read()?
)

Implementation

void bindSurveyProgress(
  int token,
  ({int? abandonedAtItem, int? answeredCount}) Function()? read,
) {
  if (read == null) {
    if (_surveyProgressToken != token) return;
    _surveyProgressToken = null;
    _surveyProgress = null;
    return;
  }
  _surveyProgressToken = token;
  _surveyProgress = read;
}