auto_orientation 1.0.5

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
AutoOrientation.fullAutoMode();

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.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

example/README.md

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:


dependencies:
  auto_orientation: ^1.0.5

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';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
92
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
96
Learn more about scoring.

We analyzed this package on Jul 15, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.4.0
  • pana: 0.12.19
  • Flutter: 1.7.8+hotfix.3

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

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.

Dependencies

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
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8

Admin