Skip to content

Commit 5fc16f8

Browse files
committed
Adding 'await' - fixes the release version
The release version of the app was crashing on startup. This was because the environment variables were not being set before the app was started. This was because the code was not waiting for the environment variables to be set before trying to connect to the GraphQL client.
1 parent 9950443 commit 5fc16f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/main.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import 'package:overlay_support/overlay_support.dart';
1010

1111
void main() async {
1212
WidgetsFlutterBinding.ensureInitialized();
13-
EnvironmentConfig.loadEnvVariables();
14-
SystemChrome.setPreferredOrientations([
13+
await EnvironmentConfig.loadEnvVariables();
14+
await SystemChrome.setPreferredOrientations([
1515
DeviceOrientation.portraitUp,
1616
DeviceOrientation.portraitDown,
1717
]);

0 commit comments

Comments
 (0)