Skip to content
pubscout

device_orientation

1.0.0, released 3 years ago by wrbl.xyz

Check absolute device orientation via accelerometer and keep widgets pointing down.

WASM-ready
$ flutter pub add device_orientation

What it does

It reads absolute device orientation using accelerometer events, even when system rotation is disabled. It provides streams, current values, and helper widgets like AlwaysDown and AnimatedAlwaysDown to ensure critical widgets stay readable and point downwards.

AI-written summary of version 1.0.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to rotate specific widgets based on physical device rotation independently of system settings.
  • You want to ensure certain UI elements always point down for readability.

Skip it when

  • You only need standard system-level screen rotation handled by the operating system.
  • Target devices lack accelerometer sensors.

Strengths

  • Works even when system rotation is disabled.
  • Includes built-in helper widgets for animated and static orientation correction.
  • Provides both a current value field and an orientation change stream.

Weaknesses

  • Defaults to portraitUp on devices without or lacking support for accelerometer sensors.
  • Limited documentation on advanced configuration.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
1

not documented

AnimatedAlwaysDown(
  child: Text("I'm readable!")
)

Alternatives

Packages that do the same job and could replace device_orientation.

Works with

Packages commonly used together with device_orientation: ones it builds on, ones built on it, and its own family.