Skip to content

Instantly share code, notes, and snippets.

@burkido
Created March 23, 2024 14:43
Show Gist options
  • Save burkido/da4509d0c6b097afee734bbc2d4d1fbc to your computer and use it in GitHub Desktop.
Save burkido/da4509d0c6b097afee734bbc2d4d1fbc to your computer and use it in GitHub Desktop.
This data class represents a link annotation used in text formatting, containing properties for the tag, annotation (URL), and the style applied to the corresponding text span. It is marked as immutable (@immutable).
/**
* Data class representing a link annotation.
*
* @property tag The tag that will be used to identify this annotation in the text.
* @property annotation The actual annotation(url) that will be attached to the tag in the text.
* @property style The style that will be applied to the text span that matches the tag.
*/
@Immutable
data class StringAnnotation(
val tag: String,
val annotation: String,
val style: SpanStyle
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment