Friday, June 5, 2026
HomeiOS DevelopmentPower panorama mode in flutter apps - in iOS & Android

Power panorama mode in flutter apps – in iOS & Android

[ad_1]

For SystemChrome you must add bundle

import 'bundle:flutter/providers.dart';

for panorama mode add this code

  void initState() {
    tremendous.initState();
    //for panorama mode
    SystemChrome.setPreferredOrientations([
      DeviceOrientation.landscapeRight,
      DeviceOrientation.landscapeLeft,
    ]);
  }

You get regular web page

 @override
dispose(){
  SystemChrome.setPreferredOrientations([
    DeviceOrientation.portraitUp,
    DeviceOrientation.portraitDown,
    DeviceOrientation.landscapeRight,
    DeviceOrientation.landscapeLeft,
  ]);
  tremendous.dispose();
}

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments