TestRestorationManager class Null safety

The RestorationManager used for tests.

Unlike the real RestorationManager, this one just keeps the restoration data in memory and does not make it available to the engine.



Creates a TestRestorationManager.


debugRootBucketAccessed bool
Whether the rootBucket has been obtained.
hashCode int
The hash code for this object.
read-only, inherited
hasListeners bool
Whether any listeners are currently registered.
@protected, read-only, inherited
isReplacing bool
Returns true for the frame after rootBucket has been replaced with a new non-null bucket.
read-only, inherited
restorationData TestRestorationData
The current restoration data from which the current state can be restored.
rootBucket Future<RestorationBucket?>
The root of the RestorationBucket hierarchy containing the restoration data.
read-only, override
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
disableRestoration() → void
Disabled state restoration.
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).
@mustCallSuper, inherited
flushData() → void
Called to manually flush the restoration data to the engine.
handleRestorationUpdateFromEngine({required bool enabled, required Uint8List? data}) → void
Called by the RestorationManager on itself to parse the restoration information obtained from the engine.
@protected, inherited
initChannels() → void
Sets up the method call handler for SystemChannels.restoration.
@protected, inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
notifyListeners() → void
Call all the registered listeners.
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
restoreFrom(TestRestorationData data) → void
Restores the state from the provided TestRestorationData.
scheduleSerializationFor(RestorationBucket bucket) → void
Called by a RestorationBucket to request serialization for that bucket.
sendToEngine(Uint8List encodedData) Future<void>
Called by the RestorationManager on itself to send the provided encoded restoration data to the engine.
toString() String
A string representation of this object.
unscheduleSerializationFor(RestorationBucket bucket) → void
Called by a RestorationBucket to unschedule a request for serialization.


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