Skip to content

Function: onOrientation()

onOrientation(): Stream<"portrait" | "landscape">

Defined in: streams/onOrientation.ts:21

Creates a stream that emits the current screen orientation, either "portrait" or "landscape", whenever it changes.

Automatically unsubscribes when unsubscribed.

Returns

Stream<"portrait" | "landscape">

A stream that emits a string indicating the screen's orientation.

Released under the MIT License.