Skip to content

Commit 5657736

Browse files
committed
fixed orientation handling
1 parent 3c7b06a commit 5657736

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/main.dart

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import 'dart:io';
44

55
import 'package:flutter/material.dart';
6+
import 'package:flutter/services.dart';
67
import 'package:get/get.dart';
78

89
import 'package:loggy/loggy.dart';
@@ -46,7 +47,10 @@ Future main([List<String> args = const []]) async {
4647
'${testingDirectory.path}/profiles/acae0462-6a34-11e4-8001-002590720087',
4748
).createSync(recursive: true);
4849
}
49-
50+
SystemChrome.setPreferredOrientations([
51+
DeviceOrientation.portraitUp,
52+
DeviceOrientation.portraitDown
53+
]).then((value) =>
5054
runApp(
5155
FutureBuilder<Directory>(
5256
future: getApplicationDocumentsDirectory(),
@@ -57,7 +61,7 @@ Future main([List<String> args = const []]) async {
5761
)
5862
: const AppSetupPlaceholder(),
5963
),
60-
);
64+
));
6165
}
6266

6367
Future init() async {

0 commit comments

Comments
 (0)