localize

fun <T, R, LOCALIZER : PolyglotReferenceValueLocalizer<T, R>> LOCALIZER.localize(value: T, lifecycleOwner: LifecycleOwner = LocalLifecycleOwner.current, minActiveState: Lifecycle.State = Lifecycle.State.STARTED, clock: ClockWrapper = SYSTEM_CLOCK.collectAsStateWithLifecycle(lifecycleOwner, minActiveState).value, timeZone: TimeZone = SYSTEM_TIMEZONE.collectAsStateWithLifecycle(lifecycleOwner, minActiveState).value, maxTick: Duration? = null): R(source)

Utility function that collects the values from this LOCALIZER in a lifecycle-aware manner.

Parameters

value

the value to localize

clock

the Clock to use for localization. By default, it collects SYSTEM_CLOCK, so any clock change is immediately reflected

timeZone

the TimeZone to use for localization. By default, it collects SYSTEM_TIMEZONE, so any timezone change is immediately reflected

maxTick

the maximum amount of to wait for a recomputation (as long as this underlying provider returns a non-null TickingValue.nextTick). If null (the default), no max tick bound is applied.

See also