restoration constant
A MethodChannel for synchronizing restoration data with the engine.
The following outgoing methods are defined for this channel (invoked using OptionalMethodChannel.invokeMethod):
get
: Retrieves the current restoration information (e.g. provided by the operating system) from the engine. The method returns a map containing anenabled
boolean to indicate whether collecting restoration data is supported by the embedder. Ifenabled
is true, the map may also contain restoration data stored under thedata
key from which the state of the framework may be restored. The restoration data is encoded as Uint8List.put
: Sends the current restoration data to the engine. Takes the restoration data encoded as Uint8List as argument.
The following incoming methods are defined for this channel (registered using MethodChannel.setMethodCallHandler).
push
: Called by the engine to send newly provided restoration information to the framework. The argument given to this method has the same format as the object that theget
method returns.
See also:
- RestorationManager, which uses this channel and also describes how restoration data is used in Flutter.
Implementation
static const MethodChannel restoration = OptionalMethodChannel(
'flutter/restoration',
);