diff --git a/audio_call/android/gradle.properties b/audio_call/android/gradle.properties index 2bd6f4f..1441b1d 100644 --- a/audio_call/android/gradle.properties +++ b/audio_call/android/gradle.properties @@ -1,2 +1,3 @@ org.gradle.jvmargs=-Xmx1536M +android.enableR8=true diff --git a/audio_call/lib/main.dart b/audio_call/lib/main.dart index 9837e68..2008f3d 100644 --- a/audio_call/lib/main.dart +++ b/audio_call/lib/main.dart @@ -23,10 +23,8 @@ GetIt getIt = GetIt.instance; void main() { setupLocator(); - - PushService(); - runApp(MyApp()); + PushService(); } void setupLocator() { @@ -42,6 +40,7 @@ class MyApp extends StatelessWidget { //android only navigateToIncomingCallIfNeeded() async { + WidgetsFlutterBinding.ensureInitialized(); bool navigate = await NotificationsAndroid.didNotificationLaunchApp(); if (navigate) { NotificationsAndroid.cancelNotification(); @@ -61,7 +60,6 @@ class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { - SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); return MaterialApp( title: 'Audio call', theme: ThemeData(