setDefaultOverlaysAndOrientations method
set the default orientations and overlays after exit of fullscreen
Implementation
Future<void> setDefaultOverlaysAndOrientations() async {
await SystemChrome.setPreferredOrientations(orientations);
await SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual,
overlays: overlays);
if (UniversalPlatform.isIOS) {
AutoOrientation.portraitAutoMode();
}
}