There is a lot to love about Jetpack Compose, but it lacks Serializable support for AnnotatedString. This makes it impossible to guarantee state restoration for AnnotatedStrings that are composed outside of the UI layer and passed in Parcels. To avoid crashing, you'll have to annotate with `RawValue` which makes this unreliable.

Vintage Strings, which are Serializable, can contain Drawables in Spans for a rich text experience, but for some reason Annotated String requires declaration of Placeholders and Child Composables which cannot be serialized. This seems like a major design flaw.

I've opened a feature request. Would appreciate your +1s!
https://issuetracker.google.com/issues/351662731

Google Issue Tracker