From 308f7d93f5cfc5c5b46e9eeb4bdb20c9ae02ea5e Mon Sep 17 00:00:00 2001 From: "Alexander \"PapaTutuWawa" Date: Sat, 18 Mar 2023 14:59:47 +0100 Subject: [PATCH] chore(example): Update the example --- example/lib/main.dart | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/example/lib/main.dart b/example/lib/main.dart index 6b304d2..9cf66a4 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -110,11 +110,6 @@ class _MyHomePageState extends State { jid: JID.fromString(jidController.text), password: passwordController.text, useDirectTLS: true, - // If `allowPlainAuth` is `false`, connecting to some - // servers will cause apps to hang, and never connect. - // The hang is a bug that will be fixed, so when it is, - // allowPlainAuth should be set to false. - allowPlainAuth: true, ), ); final result = await connection.connect(waitUntilLogin: true); @@ -122,14 +117,14 @@ class _MyHomePageState extends State { connected = result.isType() && result.get(); loading = false; }); - if (result.isType()) { - logger.severe(result.get()); + if (result.isType()) { + logger.severe(result.get()); if (context.mounted) { showDialog( context: context, builder: (_) => AlertDialog( title: const Text('Error'), - content: Text(result.get().toString()), + content: Text(result.get().toString()), ), ); }