supportedOrientations property

  1. @override
Iterable<DeviceOrientation> get supportedOrientations
override

Device orientations this screen supports while it is the topmost visible page. The router applies the topmost screen's value via SystemChrome.setPreferredOrientations on each active-screen change, mirroring UIKit's per-UIViewController.supportedInterfaceOrientations. Override to force portrait/landscape on a specific page (e.g. a camera).

Implementation

@override
Iterable<DeviceOrientation> get supportedOrientations => const [
  DeviceOrientation.portraitUp,
];