Andrewngabriel / rotation_check

Simple Flutter utility package to check if auto-rotate is enabled on iOS or Android device

Home Page:https://pub.dev/packages/rotation_check

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rotation_check

Simple utility package to check whether auto-rotate or portrait orientation lock is turned on/off across Android and iOS.

Usage

To use this plugin, add rotation_check as a dependency in your pubspec.yaml file.

Example

import 'package:rotation_check/rotation_check.dart';

// Check if auto-rotate is enabled
RotationCheck rotationCheck = RotationCheck();
bool isRotationEnabled = await rotationCheck.isRotationEnabled();

NOTE: This plugin currently works on Android and has a no-op implementation on iOS. Due to the nature of iOS, it is not possible to check whether the orientation lock is enabled or not through any public facing APIs that Apple provides. I've been researching ways to utilize gyroscope and accelerometer sensor data to obtain auto-rotate.

Issues and feedback

// TODO: Add issues link

About

Simple Flutter utility package to check if auto-rotate is enabled on iOS or Android device

https://pub.dev/packages/rotation_check

License:GNU General Public License v3.0


Languages

Language:Dart 54.5%Language:Kotlin 18.2%Language:Ruby 14.1%Language:Swift 12.9%Language:Objective-C 0.2%