Property

LocalTimeSource

CompositionLocal providing the TimeSource for TimeText.

Source set: Android
public val LocalTimeSource: ProvidableCompositionLocal<TimeSource> = staticCompositionLocalOf {
    DefaultTimeSource()
}

CompositionLocal providing the TimeSource for TimeText.

This provides the mechanism to override the time source for composables that may display TimeText without providing a slot for an explicit timeSource parameter, such as the fallback TimeText provided by AppScaffold or ScreenScaffold for platform builds that do not support the system status bar.

Example of providing a fixed time for testing:

Content updated: