Coder Social home page Coder Social logo

sososdk / flutter_orientation Goto Github PK

View Code? Open in Web Editor NEW
49.0 1.0 33.0 203 KB

A Flutter plugin for device's orientation

License: Apache License 2.0

Java 38.13% Ruby 11.45% Objective-C 17.60% Dart 23.92% Kotlin 0.45% Swift 3.64% HTML 4.80%
flutter flutter-plugin orientation orientation-sensor

flutter_orientation's Introduction

flutter_orientation's People

Contributors

sososdk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

flutter_orientation's Issues

iOS always shows DeviceOrientation.landscapeLeft

I have following code

subscription = OrientationHelper.onOrientationChange.listen((value) { print(value); });

It always shows DeviceOrientation.landscapeLeft. It is working as expected on Android.

Flutter 1.20.4 •
Dart 2.9.2

on ios, OrientationPlugin.forceOrientation(DeviceOrientation.landscapeRight) not work

what I need: I need the landscape mode only for one screen and the portrait mode for every other screen... Your solution does not help me with my current problem, but thank you a lot for your help!

when I close landscapeRight and landscapeLeft on ios InfoList,OrientationPlugin.forceOrientation(DeviceOrientation.landscapeRight) do not work!! it works just when InfoList orientation landscap config is open! but, that is not I expect!

How to lock the screen in IOS pad?

i use
OrientationPlugin.setPreferredOrientations([DeviceOrientation.portraitUp])
OrientationPlugin.forceOrientation(DeviceOrientation.portraitUp);

but not lock the screen orientation,
How to solve it?thanks。

SystemChrome does not work when usign plugin

SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]).then((_) {
    runApp(MyApp());
});

Wont work if using this plugin, and using this code wont too:

OrientationPlugin.forceOrientation(DeviceOrientation.portraitUp).then((_){
    runApp(MyApp());
});

The app always rotates no matter what.

[Feature request] Need options such as [sensitivity] or [threshold]

the onOrientationChange is too sensitive for my app. it change the orientation from landscape to portrait when I lay the phone on the table. (the screen face to sky)
It will be better to have some parameters to limit the how much orientation angle changing will call the onOrientationChange callback.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.