NavBackStackSerializer
class NavBackStackSerializer<T : NavKey>(elementSerializer: KSerializer<T>) : KSerializer<NavBackStack<T>>
A KSerializer for NavBackStack.
This serializer wraps a KSerializer for the element type T, enabling serialization and deserialization of NavBackStack instances. The serialization of individual elements is delegated to the provided elementSerializer.
If your stack elements T are open polymorphic (e.g., a interface for different screens), the provided elementSerializer must be correctly configured to handle this.
Parameters
elementSerializer
The KSerializer used to serialize and deserialize individual elements.
Type Parameters
T
The type of elements stored in the NavBackStack.