MemoryPersistenceProvider class

Implementation of PersistenceProvider that uses internal memory for persistence.

Of course, once the app is stopped or cleared from memory, the internal memory is deleted and historic persistence of completed steps are lost.

This is a great implementation for testing.

Implemented types

Constructors

MemoryPersistenceProvider(Set<String?> steps)
Instantiates a new MemoryPersistenceProvider with an initial completed set of steps.
const
MemoryPersistenceProvider.empty()
Instantiates an empty MemoryPersistenceProvider instance.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clearStep(String featureId) Future<void>
Requests that the persistence layer should remove the completion of the step identified by featureId.
override
clearSteps(Iterable<String> featuresIds) Future<void>
Requests that the historic steps identified by featuresIds be cleared from the persistence layer.
override
completedSteps(Iterable<String?>? featuresIds) Future<Set<String?>>
Returns the list of steps (as strings) that the user has previously completed from the provided featuresIds set.
override
completeStep(String? featureId) Future<void>
Informs the persistence layer that the user has completed the step identified by featureId, and that it should record it in the persistence layer.
override
hasCompletedStep(String featureId) Future<bool>
Returns true if the step identified by featureId has completed by the user earlier, false otherwise.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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