TestRestorationManager class

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.

Inheritance

Constructors

TestRestorationManager()
Creates a TestRestorationManager.

Properties

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

Methods

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

Operators

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