Skip to content
pubscout

native_device_orientation

2.1.3, released 2 months ago by an unverified publisher

A Flutter plugin for reading native device orientation from UI or sensors.

WASM-ready
$ flutter pub add native_device_orientation
Source repository

What it does

Allows Flutter applications to read the native device orientation on Android and iOS. It differentiates between landscape left and landscape right, and can optionally read orientation directly from device sensors.

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

Use it when

  • You need to differentiate between landscape left and landscape right.
  • You need to read orientation directly from device sensors instead of just window size.
  • You want built-in widgets to handle orientation layouts automatically.

Skip it when

  • Standard Flutter orientation checks based on screen dimensions are sufficient for your app.

Strengths

  • Differentiates landscape left from landscape right.
  • Supports both UI orientation and direct sensor readings.
  • Provides convenient built-in reader and oriented widgets.

Weaknesses

  • Sensor-based orientation has been tested less thoroughly.
  • Requires platform-specific configuration adjustments for Swift Package Manager on iOS.

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
1

May require cleaning build files or adjusting iOS folder settings when using Swift Package Manager.

NativeDeviceOrientationReader(
  builder: (context) {
    Orientation orientation = NativeDeviceOrientationReader.orientation(context);
    return Text("Current orientation: $orientation");
  },
)

Alternatives

Packages that do the same job and could replace native_device_orientation.

Works with

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