auto_orientation
iOS और Android के लिए प्रोग्रामेटिक रूप से डिवाइस ओरिएंटेशन सेट करें
एक फ्लटर प्लगइन जो कार्यक्रमानुसार दिशा और घूर्णन बदलता है
यह अंग्रेज़ी मूल स्नैपशॉट है। नवीनतम सामग्री GitHub पर देखें।
This plugin was created to programmatically rotate on iOS and Android
After importing the package you can use:
AutoOrientation.landscapeLeftMode(); or
AutoOrientation.landscapeRightMode(); or
AutoOrientation.portraitDownMode(); (might not work) or
AutoOrientation.portraitUpMode(); or
AutoOrientation.portraitAutoMode(); (Android only) or
AutoOrientation.portraitAutoMode(forceSensor: true); (Use sensor data to change direction, ignoring user's rotation preference. Much like Youtube fullscreen. Android only) or
AutoOrientation.landscapeAutoMode(); (Android only) or
AutoOrientation.landscapeAutoMode(forceSensor: true); (Use sensor data to change direction, ignoring user's rotation preference. Much like Youtube fullscreen. Android only) 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.
Please have a look in the example/ folder
निर्भरता सूची 1 आइटम
{"sdk":"flutter"}उपयोग के अनुसार छाँटें, गतिविधि की तुलना करें और अपनाने से पहले मूल प्रोजेक्ट की आवश्यकताएँ जाँचें।
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗