restorationScopeId property Null safety

String? restorationScopeId

Restoration ID to save and restore the state of the Router.

If non-null, the Router will persist the RouterDelegate's current configuration (i.e. RouterDelegate.currentConfiguration). During state restoration, the Router informs the RouterDelegate of the previous configuration by calling RouterDelegate.setRestoredRoutePath (which by default just calls RouterDelegate.setNewRoutePath). It is the responsibility of the RouterDelegate to restore its internal state based on the provided configuration.

The router uses the RouteInformationParser to serialize and deserialize RouterDelegate.currentConfiguration. Therefore, a routeInformationParser must be provided when restorationScopeId is non-null.

See also:


final String? restorationScopeId;