Package-level declarations

Types

Link copied to clipboard
@RequiresOptIn(message = "This API is experimental and is likely to change in the future.", level = RequiresOptIn.Level.WARNING)
annotation class ExperimentalSparkApi
Link copied to clipboard
@RequiresOptIn(level = RequiresOptIn.Level.ERROR, message = "This is an internal com.adevinta.spark API that should not be used from outside of com.adevinta.spark. No compatibility guarantees are provided. It is recommended to create a feature request, so the Spark team can see with you if the existing API needs to be more open in a next version of Spark")
annotation class InternalSparkApi

Marks declarations that are internal in Spark API, which means that should not be used outside of com.adevinta.spark, because their signatures and semantics will change between future releases without any warnings and without providing any migration guide.

Link copied to clipboard
data class SparkFeatureFlag(val useSparkTokensHighlighter: Boolean = false, val useSparkComponentsHighlighter: Boolean = false, val isContainingActivityEdgeToEdge: Boolean = false, val useRebrandedShapes: Boolean = false)

Flags that will activate debugging features from Spark or features hidden to consumers.

Link copied to clipboard
object SparkTheme

Contains functions to access the current theme values provided at the call site's position in the hierarchy.

Properties

Link copied to clipboard

CompositionLocal used to pass SparkExceptionHandler down the tree to enable control on some crashable behaviors at consumers

Functions

Link copied to clipboard
fun PreviewWrapper(padding: PaddingValues = PaddingValues(16.dp), contentPadding: Dp = 16.dp, color: @Composable () -> Color = { SparkTheme.colors.background }, content: @Composable ColumnScope.() -> Unit)

A wrapper composable that provides a consistent preview environment for other composables using Spark.

Link copied to clipboard
fun SparkTheme(colors: SparkColors = SparkTheme.colors, shapes: SparkShapes = SparkTheme.shapes, typography: SparkTypography = SparkTheme.typography, sparkFeatureFlag: SparkFeatureFlag = SparkFeatureFlag(), fontFamily: SparkFontFamily = sparkFontFamily( useSparkTokensHighlighter = sparkFeatureFlag.useSparkTokensHighlighter, ), exceptionHandler: SparkExceptionHandler = if (LocalInspectionMode.current) { NoOpSparkExceptionHandler } else { DefaultSparkExceptionHandler }, content: @Composable () -> Unit)

Spark Theming refers to the customization of your Spark Design app to better reflect your product’s brand.