rememberRequiredService

Remembers and retrieves a required Android system service of type T.

Caches the lookup across recompositions via remember for optimal performance.

Example usage:

val windowManager = rememberRequiredService<WindowManager>()

Return

The requested non-null system service of type T.

Throws

if the service is unavailable on the device.