auto_orientation 1.0.6

  • Readme
  • Changelog
  • Example
  • Installing
  • 97

auto_orientation #

This plugin was created to programmatically rotate on iOS and Android

Getting Started #

After importing the package you can use:
AutoOrientation.landscapeLeftMode(); or
AutoOrientation.landscapeRightMode(); or
AutoOrientation.portraitDownMode(); (might not work) or
AutoOrientation.portraitUpMode(); or
AutoOrientation.portraitAutoMode(); or
AutoOrientation.landscapeAutoMode(); or

No need to call SystemChrome.setPreferredOrientations because it has been added to the library itself.
This has been done because before android auto-rotation wasn't working after setting rotation using the plugin.

We've used it for a VideoScaffold, to programmatically change to landscape and back to portrait if the scaffold is disposed.

Example #

Please have a look in the example/ folder

1.0.6 #

  • Fix fontVariationSettings not found issue when building release Android builds on Flutter 1.12

1.0.5 #

  • Revert flutter dependency version

1.0.4 #

  • Update flutter dependency version

1.0.3 #

  • Format code and update dependency version pinning

1.0.2 #

  • Fix compatibility with android

1.0.1 #

  • Update Changelog

1.0.0 #

  • Add more specific implementation
  • Add Android Support
  • Add Example

0.0.2 #

  • Create github repository and link it

0.0.1 #

  • Create the first auto rotation for iOS


AutoOrientation Example #

An example of how to use the auto orientation plugin for Flutter

Getting Started #

For help getting started with Flutter, view our online documentation.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  auto_orientation: ^1.0.6

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:auto_orientation/auto_orientation.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jan 27, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.4
  • Flutter: 1.12.13+hotfix.5

Health issues and suggestions

Document public APIs. (-1 points)

10 out of 10 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8