FLUTTER ECOSYSTEM

bytepark/auto_orientation

프로그래밍 방식으로 방향과 회전을 변경하는 플러터 플러그인

자동 방향 프로젝트 이미지
Stars
46
Forks
75
최근 푸시(UTC)
2024. 8. 18.
프로젝트 상태
활성
bytepark GitHub avatar
GITHUB Organization

bytepark ↗

언어DartJavaSwiftRubyKotlinObjective-C

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 1 개
  • flutter{"sdk":"flutter"}

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

README 펼치기 / 접기

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

Example

Please have a look in the example/ folder