From bc41ea6d82da6b2562d44d3f71c042641200073c Mon Sep 17 00:00:00 2001 From: Rivka Segan <15526879-rivkasegan@users.noreply.gitlab.com> Date: Sun, 1 Oct 2023 19:20:20 +0000 Subject: [PATCH] isDesktop false if isWeb true in responsive.dart https://gitlab.com/veilid/veilidchat/-/tree/268b86d1319d3bd77dff857c7154250679a081ef tries to access Platform._operatingSystem as part of checking whether it is running on Windows, Linux, or macOS, and this information is not available on the web. This MR makes it possible to reach the VeilidChat "Create a new account" screen when running in Chrome (although the user apparently can't proceed further because of an "already borrowed" panic). Without this MR, there is an uncaught error even before getting to that account screen. --- lib/tools/responsive.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tools/responsive.dart b/lib/tools/responsive.dart index bac55ed..4ee206b 100644 --- a/lib/tools/responsive.dart +++ b/lib/tools/responsive.dart @@ -7,7 +7,7 @@ bool get isAndroid => !kIsWeb && Platform.isAndroid; bool get isiOS => !kIsWeb && Platform.isIOS; bool get isWeb => kIsWeb; bool get isDesktop => - Platform.isWindows || Platform.isLinux || Platform.isMacOS; + !isWeb && (Platform.isWindows || Platform.isLinux || Platform.isMacOS); const kMobileWidthCutoff = 479.0;