SurveyProvider class

Mixed-in types

Constructors

SurveyProvider({required BuildContext context, SurveyConfiguration configuration = const SurveyConfiguration(), required List<SurveyStep> steps})

Properties

completionPercentage double
Calculates the percentage of the survey that has been completed.
no setter
configuration SurveyConfiguration
final
context BuildContext
final
currentStep SurveyStep
Returns the current step in the survey.
no setter
currentStepIndex int
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
isCurrentStepAnswered bool
Checks if the current step has an answer.
no setter
isCurrentStepLoading bool
Returns true if the current step is loading.
no setter
isCurrentStepRequired bool
Checks if the current step is required.
no setter
isFirstStep bool
Checks if the current step is the first step in the survey.
no setter
isLastStep bool
Checks if the current step is the last step in the survey.
no setter
nextStepItem SurveyStep?
Returns the next step in the survey, or null if the current step is the last step.
no setter
previousStepItem SurveyStep?
Returns the previous step in the survey, or null if the current step is the first step.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stepPageController PageController
getter/setter pair
steps List<SurveyStep>
getter/setter pair

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
cancelSurvey() → void
Cancels the survey and resets all steps.
completeSurvey() List<SurveyStep>
Completes the survey and returns the steps.
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
inherited
handleStepCallbacks(SurveyStep currentStep) Future<void>
Navigates to a specific step in the survey.
nextStep() Future<void>
Moves to the next step in the survey and completes the survey if it's the last step.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
previousStep() Future<void>
Moves to the previous step in the survey or cancels the survey if it's the first step.
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
startSurvey() → void
Starts the survey by pushing the SurveyScaffold page onto the navigation stack.
toString() String
A string representation of this object.
inherited
updateAnswer(String stepId, dynamic answer) Future<void>
Updates the answer for a specific survey step.
updateStepsListener() → void
Updates the listener for the step page controller.

Operators

operator ==(Object other) bool
The equality operator.
inherited