Skip to content
pubscout

auto_orientation

2.3.1, released 4 years ago by an unverified publisher

Programmatically set device orientation on iOS and Android.

WASM-ready
$ flutter pub add auto_orientation
Source repository

What it does

The plugin exposes static methods to lock the device orientation to landscape or portrait, including auto modes that use sensor data. It handles platform differences and works without calling SystemChrome directly.

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

Use it when

  • When building a video player that needs to switch to landscape full-screen
  • When you want to lock orientation during a specific screen or flow
  • When you need to enforce a particular orientation without user rotation

Skip it when

  • When you want the user to rotate freely
  • When targeting web or desktop platforms

Strengths

  • Simple API with static methods
  • Supports iOS <16 and Android V2 embedding
  • Handles auto modes with sensor data
  • No extra dependencies

Weaknesses

  • No support for web/desktop
  • Some modes may not work on iOS (e.g., portraitDown)
  • Limited to orientation only

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
0
AutoOrientation.landscapeLeftMode();

Alternatives

Packages that do the same job and could replace auto_orientation.