Last updated:
0 purchases
orientation widget
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(),
)
copied to clipboard
Keep landscape orientations
OrientationWidget.landscape(
child: const LandscapePage(),
)
copied to clipboard
Keep specific orientations
OrientationWidget(
child: const LandscapeLeftPage(),
orientations: [DeviceOrientation.landscapeLeft],
)
copied to clipboard
Then reset to specific orientations, otherwise it allows autoOrientations
OrientationWidget.portrait(
child: const PortraitPage(),
then: landscapeOrientations,
),
copied to clipboard
Additional information #
Feel free to give feedbacks or report issues. Thank you!
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.