restore method
- StateSnapshot snapshot, {
- bool quiescent = false,
Validates and then restores all registered participants.
Implementation
void restore(StateSnapshot snapshot, {bool quiescent = false}) {
validateRestore(snapshot, quiescent: quiescent);
final recordsByPath = {
for (final record in snapshot.records) record.path: record,
};
for (var index = 0; index < _orderedParticipants.length; index++) {
final participant = _orderedParticipants[index];
participant.restore(
transactionId: index,
image: recordsByPath[participant.path]!.image,
quiescent: quiescent,
);
}
}