diff options
author | uvok | 2025-07-29 14:00:47 +0200 |
---|---|---|
committer | uvok | 2025-07-29 14:00:47 +0200 |
commit | f2c186f93939cabda93bffac3419dc92999eddf3 (patch) | |
tree | d7dfb2b413f06fe2f175b4dae1a1b26438a3b3e3 | |
parent | 38d7bab06a3b776d6e3410a10d5fa2bada95866c (diff) |
Longer timeout, probably needed for Android?
-rw-r--r-- | lib/device.dart | 3 | ||||
-rw-r--r-- | lib/main.dart | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/lib/device.dart b/lib/device.dart index 94b2899..6442ee8 100644 --- a/lib/device.dart +++ b/lib/device.dart @@ -85,11 +85,12 @@ class DeviceState extends State<DeviceScreen> { try { logger.i("Try to connect..."); // connect timeout doesn't work under Linux - await dev.connect().timeout(Duration(seconds: 1)); + await dev.connect().timeout(Duration(seconds: 2)); logger.i("Connected!"); connectStatus = "Connected"; } catch (e) { + logger.e(e); dev.disconnect().ignore(); connectStatus = e.toString(); } finally { diff --git a/lib/main.dart b/lib/main.dart index 476d6a7..b503674 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,5 +1,3 @@ -import 'dart:convert'; - import 'dart:io' show Platform; import 'package:badge/device.dart'; |