A Flutter widget that forces the device rotates into the set of orientations the application interface can be displayed in.

Overview

A Flutter widget that forces the device rotates into the set of orientations the application interface can be displayed in.

Features

Force device keep portrait/landscape or what the set of orientations that you want. Support to reset that config after disposing.

Getting started

Keep in mind that the widget will only work once in a top-level container. the descendants will not work.

Usage

Keep portrait orientations

OrientationWidget.portrait(
  child: const PortraitPage(),
)

Keep landscape orientations

OrientationWidget.landscape(
  child: const LandscapePage(),
)

Keep specific orientations

OrientationWidget(
  child: const LandscapeLeftPage(),
  orientations: [DeviceOrientation.landscapeLeft],
)

Then reset to specific orientations, otherwise it allows autoOrientations

OrientationWidget.portrait(
  child: const PortraitPage(),
  then: landscapeOrientations,
),

Additional information

Feel free to give feedbacks or report issues. Thank you!

You might also like...

This repo contains a collection of permission related Flutter plugins which can be used to request permissions to access device resources in a cross-platform way.

Flutter Permission Plugins Deprecation Notice This repository has been replaced by the Flutter permission_handler plugin and will not longer be mainta

Dec 13, 2021

A Flutter ListView in which items can be grouped into sections.

A Flutter ListView in which items can be grouped into sections.

Grouped list package for Flutter. Now with beta support for null safety! A flutter ListView in which list items can be grouped to sections. Features S

Dec 26, 2022

Home app - A dynamic flutter app which can be used to generate alerts, set alarms and send sms or call someone

Home app - A dynamic flutter app which can be used to generate alerts, set alarms and send sms or call someone

first_app A dynamic flutter app which can be used to generate alerts, set alarms

Apr 9, 2022

A responsive scaffold widget that adjusts to your device size, for your flutter mobile and web apps.

A responsive scaffold widget that adjusts to your device size, for your flutter mobile and web apps.

scaffold_responsive A responsive scaffold widget that adjusts to your device size, for your flutter mobile and web apps. Check out the Live demo here

Sep 27, 2022

A Demo application📱 which stores User feedback from 💙Flutter application into Google Sheets🗎 using Google AppScript.

A Demo application📱  which stores User feedback from 💙Flutter application into Google Sheets🗎 using Google AppScript.

📱 Flutter 💙 to Google Sheets 📊 A Demo application which stores User feedback from Flutter application into Google Sheets using Google AppScript. Yo

Dec 28, 2022

Academic master is E-learning app where students can share their doubts wiith their peers they can chat and also they can find their notes

Academic master is E-learning app where students can share their doubts wiith their peers they can chat and also they can find their notes

Academic Master is E-learning App. Features:- 1) You can post real Post query in Images and video formates. 2) We will Provide notes,books and previou

Dec 14, 2022

This application was created using the Dart language and it is an application that contains a set of different questions and at the end shows you the number of correct answers you have answered , made by flutter

exams_app A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if thi

Dec 28, 2021

Easy to use text widget for Flutter apps, which converts inlined urls into working, clickable links

Easy to use text widget for Flutter apps, which converts inlined urls into working, clickable links

LinkText Easy to use text widget for Flutter apps, which converts inlined URLs into clickable links. Allows custom styling. Usage LinkText widget does

Nov 4, 2022

Grad text package - A Flutter Widget to draw gradients into text

Grad text package - A Flutter Widget to draw gradients into text

grad_text A Flutter Widget to draw gradients into text.(Null safe) Demo Install

Jan 31, 2022
Owner
De Men
De Men
Music-App-Flutter - This is a flutter app which has some songs displayed in the form of a list and user can play any of them by clicking on the name of the song.

music_player_app A music player app made by me in flutter About the App This is a music player which i made to play audio files which we have passed i

Harsh Kumar Khatri 3 Apr 1, 2021
Allows communication between your bot and the Web App built in Flutter displayed inside Telegram.

tele_web_app It enables communication between your bot and the Flutter-embedded Web App displayed inside Telegram by making use of interoperability be

Yeikel Uriarte Arteaga 16 Dec 8, 2022
SSH no ports provides ssh to a remote Linux device with out that device having any ports open

Ssh! No ports ssh no ports provides a way to ssh to a remote linux host/device without that device having any open ports (not even 22) on external int

The Atsign Foundation 224 Dec 21, 2022
Album Image is based in photo_manager package and has the same concept as image_picker but with a more attractive interface to choose an image or video from the device gallery, whether it is Android or iOS

Album Image is based in photo_manager package and has the same concept as image_picker but with a more attractive interface to choose an image or vide

Phuong Vu 2 Oct 13, 2022
Widget to count the amount of nested widget tree, useful in the dynamic construction of the interface when it is important to know the depth of widget.

widget_tree_depth_counter Widget Tree Depth Counter WidgetTreeDepthCounter is a simple widget to count the amount of nested widget tree, useful in the

Riccardo Cucia 4 Aug 1, 2022
This is a set of small projects focused solely on the development of the graphical interface with Flutter

My Flutter Projects Flutter apps with cool design and animations Social Media Youtube Facebook Twitter Getting Started This project is a starting poin

Kevin Melendez 500 Dec 19, 2022
Combine a set of dart files into one

dart-merger Combine a set of dart files into one. This is useful when you want to organize a group of files automatically generated by generator. Inst

Kenta Murai 2 Mar 17, 2022
Polymaker is an application that can create polygon locations dynamically in mobile apps and save the data into SQFlite to be permanent.

Polymaker Polymaker is an application that can create polygon locations dynamically in mobile apps and save the data into SQFlite to be permanent. Ins

Yusril Rapsanjani 15 Apr 17, 2022