Browse Source

neon: Fix browser not opening on login page

pull/243/head
jld3103 2 years ago
parent
commit
1d154e6dfe
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 6
      packages/neon/lib/src/pages/login.dart

6
packages/neon/lib/src/pages/login.dart

@ -32,16 +32,16 @@ class _LoginPageState extends State<LoginPage> {
_loginBloc.setServerURL(widget.serverURL);
}
_loginBloc.loginFlowInit.listen((final init) {
WidgetsBinding.instance.addPostFrameCallback((final _) {
_loginBloc.loginFlowInit.listen((final init) async {
if (init != null && !Provider.of<NeonPlatform>(context, listen: false).canUseWebView) {
WidgetsBinding.instance.addPostFrameCallback((final _) async {
await launchUrlString(
init.login,
mode: LaunchMode.externalApplication,
);
});
}
});
});
_loginBloc.loginFlowResult.listen((final result) async {
if (result != null) {

Loading…
Cancel
Save