From 24a5f9b78dc41c554564f2a4ea0b53d3770c4cfa Mon Sep 17 00:00:00 2001 From: Vishesh Handa Date: Mon, 3 Jun 2019 00:18:08 +0200 Subject: [PATCH] Let shouldEnableAnalytics not be implemented It's currently not implemented in ios --- lib/utils.dart | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/utils.dart b/lib/utils.dart index 06d60494..a13d6139 100644 --- a/lib/utils.dart +++ b/lib/utils.dart @@ -21,9 +21,14 @@ Future getVersionString() async { } Future shouldEnableAnalytics() async { - const _platform = const MethodChannel('gitjournal.io/git'); - final bool result = await _platform.invokeMethod('shouldEnableAnalytics'); - return result; + try { + const _platform = const MethodChannel('gitjournal.io/git'); + final bool result = await _platform.invokeMethod('shouldEnableAnalytics'); + return result; + } on MissingPluginException catch (e) { + print("shouldEnableAnalytics: $e"); + return false; + } } /// adb logcat