In my project, I was using flutter 3.0.3
. Once I updated to 3.0.4
and updated dependencies, suddenly when I launched the app on android
, the splash screen
is showing continuously
(never going to the main app). I tried by moving to my previous commit, downgrading
flutter but to no avail.
This happened before but I luckily fixed it by upgrading kotlin jdk
to 8(was 7 before).
I am using flutter_native_splash
library. But it looks it doesn't have any impact on my project.
This question talks about only release
mode. But, in my case it is happening both release
and debug
modes. I would really appreciate your help on this!
My main function:
void mainCommon() {
WidgetsFlutterBinding.ensureInitialized();
SentryFlutter.init(
(options) => options.dsn = Config.sentryDsn,
appRunner: () async {
await Firebase.initializeApp();
await SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
final GlobalKey<ScaffoldMessengerState> messengerKey = GlobalKey<ScaffoldMessengerState>();
await BlocOverrides.runZoned(
() async => App(
api: Api(Config.grpcChannel),
database: await Config.db,
appDirectory: await getApplicationDocumentsDirectory(),
notificationManager: await NotificationManager.init(Config.grpcChannel),
messengerKey: messengerKey,
),
blocObserver: AppBlocObserver(errorCallback: BlocErrorHandler(messengerKey).errorCallback),
);
},
);
}