From 50d72d1d7ddea8a2e16338bdd9059e55e1e0dba6 Mon Sep 17 00:00:00 2001 From: Sachin Dapkara <92971894+superiorsd10@users.noreply.github.com> Date: Sun, 24 Sep 2023 19:19:46 +0530 Subject: [PATCH] restricting the landscape mode (#77) --- lib/main.dart | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/main.dart b/lib/main.dart index 71c57717..a1dd5e1b 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:firebase_core/firebase_core.dart'; +import 'package:flutter/services.dart'; import 'package:get/get.dart'; import 'package:ultimate_alarm_clock/app/utils/constants.dart'; @@ -9,6 +10,12 @@ void main() async { WidgetsFlutterBinding.ensureInitialized(); await Firebase.initializeApp(); + + SystemChrome.setPreferredOrientations([ + DeviceOrientation.portraitUp, + DeviceOrientation.portraitDown, + ]); + runApp( GetMaterialApp( theme: kThemeData,