diff --git a/packages/neon/lib/src/pages/login.dart b/packages/neon/lib/src/pages/login.dart index 0f31a741..52a30441 100644 --- a/packages/neon/lib/src/pages/login.dart +++ b/packages/neon/lib/src/pages/login.dart @@ -32,15 +32,15 @@ class _LoginPageState extends State { _loginBloc.setServerURL(widget.serverURL); } - _loginBloc.loginFlowInit.listen((final init) { - if (init != null && !Provider.of(context, listen: false).canUseWebView) { - WidgetsBinding.instance.addPostFrameCallback((final _) async { + WidgetsBinding.instance.addPostFrameCallback((final _) { + _loginBloc.loginFlowInit.listen((final init) async { + if (init != null && !Provider.of(context, listen: false).canUseWebView) { await launchUrlString( init.login, mode: LaunchMode.externalApplication, ); - }); - } + } + }); }); _loginBloc.loginFlowResult.listen((final result) async {