OrientationLocker constructor
const
OrientationLocker({
- List<
DeviceOrientation> permittedOrientations = const [DeviceOrientation.landscapeLeft, DeviceOrientation.landscapeRight], - List<
DeviceOrientation> defaultOrientations = const [DeviceOrientation.landscapeLeft, DeviceOrientation.landscapeRight, DeviceOrientation.portraitUp, DeviceOrientation.portraitDown], - required Widget child,
- Key? key,
Creates an orientation locker widget.
Parameters:
permittedOrientations: Orientations to allow while active. Defaults to landscape onlydefaultOrientations: Orientations to restore on dispose. Defaults to all orientationschild: The child widget to display
Implementation
const OrientationLocker({
this.permittedOrientations = const [DeviceOrientation.landscapeLeft, DeviceOrientation.landscapeRight],
this.defaultOrientations = const [DeviceOrientation.landscapeLeft, DeviceOrientation.landscapeRight, DeviceOrientation.portraitUp, DeviceOrientation.portraitDown],
required this.child,
super.key
});