exception if launchUrl fails
This commit is contained in:
parent
171831994a
commit
20358c8a34
@ -60,7 +60,7 @@ class MyApp extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
title: 'Flutter Demo',
|
||||
title: 'LeineLab e.V. Key App',
|
||||
theme: ThemeData(
|
||||
colorScheme: ColorScheme.fromSeed(seedColor: Colors.yellow),
|
||||
),
|
||||
@ -564,7 +564,12 @@ class AuthentikUserSettingsChangeDialogState extends ChangeNotifier {
|
||||
|
||||
server = await HttpServer.bind("127.0.0.1", 30165);
|
||||
|
||||
await launchUrl(authorizationUrl, mode: LaunchMode.externalApplication);
|
||||
if (!await launchUrl(
|
||||
authorizationUrl,
|
||||
mode: LaunchMode.externalApplication,
|
||||
)) {
|
||||
throw Exception("Could not launch the authorization URL.");
|
||||
}
|
||||
|
||||
if (server == null) {
|
||||
// exit() might have been called before we arrived here.
|
||||
|
Loading…
x
Reference in New Issue
Block a user