auto_orientation
2.3.1, released 4 years ago by an unverified publisher
Programmatically set device orientation on iOS and Android.
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.
- auto_orientation_v2
Programmatically control device orientation on iOS, Android, and Web.
72Compare - flutter_ble_peripheral
Set a device into BLE peripheral mode and advertise custom services.
86Compare - native_device_orientation
A Flutter plugin for reading native device orientation from UI or sensors.
79Compare - flutter_rotation_sensor
Provides a stream of device orientation data including rotation matrix, quaternion, and Euler angles.
79Compare