From e389829e2c666f561bf8dadca8b53fd5ceb69656 Mon Sep 17 00:00:00 2001 From: Vishesh Handa Date: Sun, 2 Jun 2019 17:20:40 +0200 Subject: [PATCH] Fix `flutter analyze` Proper type checking is awesome. --- lib/oauthapp.dart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/oauthapp.dart b/lib/oauthapp.dart index fdbb44b3..1a392bc6 100644 --- a/lib/oauthapp.dart +++ b/lib/oauthapp.dart @@ -20,8 +20,12 @@ class OAuthAppState extends State { super.initState(); githost = createGitHost(GitHostType.GitHub); - githost.init(() { - print("GitHost initialized and has access code"); + githost.init((GitHostException e) { + if (e != null) { + print("Got exeception: $e"); + } else { + print("GitHost initialized and has access code"); + } }); }