From 68b170c3e25a568a11a6bc9134809740a02a547e Mon Sep 17 00:00:00 2001 From: Adam Velebil Date: Wed, 19 Oct 2022 10:12:25 +0200 Subject: [PATCH 1/2] api update --- lib/android/oath/state.dart | 2 +- lib/desktop/devices.dart | 4 ++-- pubspec.lock | 4 ++-- pubspec.yaml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/android/oath/state.dart b/lib/android/oath/state.dart index a94f02fe..5fe0c5dd 100755 --- a/lib/android/oath/state.dart +++ b/lib/android/oath/state.dart @@ -54,7 +54,7 @@ class _AndroidOathStateNotifier extends OathStateNotifier { } } }, onError: (err, stackTrace) { - state = AsyncValue.error(err, stackTrace: stackTrace); + state = AsyncValue.error(err, stackTrace); }); } diff --git a/lib/desktop/devices.dart b/lib/desktop/devices.dart index 9a94a8ef..0dcc5f9d 100755 --- a/lib/desktop/devices.dart +++ b/lib/desktop/devices.dart @@ -243,7 +243,7 @@ class CurrentDeviceDataNotifier extends StateNotifier> { if (info != null) { state = AsyncValue.data(YubiKeyData(dev, dev.name, info)); } else { - state = const AsyncValue.error('device-inaccessible'); + state = AsyncValue.error('device-inaccessible', StackTrace.current); } } } @@ -277,7 +277,7 @@ class CurrentDeviceDataNotifier extends StateNotifier> { state = AsyncValue.data(YubiKeyData(node, result['data']['name'], DeviceInfo.fromJson(result['data']['info']))); } else { - state = AsyncValue.error(result['data']['status']); + state = AsyncValue.error(result['data']['status'], StackTrace.current); } } } on RpcError catch (e) { diff --git a/pubspec.lock b/pubspec.lock index beae76a4..82c9c246 100755 --- a/pubspec.lock +++ b/pubspec.lock @@ -225,7 +225,7 @@ packages: name: flutter_riverpod url: "https://pub.dartlang.org" source: hosted - version: "1.0.4" + version: "2.0.2" flutter_test: dependency: "direct dev" description: flutter @@ -462,7 +462,7 @@ packages: name: riverpod url: "https://pub.dartlang.org" source: hosted - version: "1.0.3" + version: "2.0.2" screen_retriever: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 4d40ea75..db6ae591 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -45,7 +45,7 @@ dependencies: logging: ^1.1.0 collection: ^1.16.0 shared_preferences: ^2.0.12 - flutter_riverpod: ^1.0.0 + flutter_riverpod: ^2.0.2 json_annotation: ^4.6.0 freezed_annotation: ^2.0.3 window_manager: ^0.2.7 From 4371e00b53e556c184ba7e7d2c60781e916a86f1 Mon Sep 17 00:00:00 2001 From: Adam Velebil Date: Wed, 19 Oct 2022 10:12:51 +0200 Subject: [PATCH 2/2] fix typo --- lib/desktop/devices.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/desktop/devices.dart b/lib/desktop/devices.dart index 0dcc5f9d..7d169adc 100755 --- a/lib/desktop/devices.dart +++ b/lib/desktop/devices.dart @@ -53,7 +53,7 @@ class UsbDeviceNotifier extends StateNotifier> { UsbDeviceNotifier(this._rpc) : super([]); void refresh() { - _log.debug('Refreshing all USB devics'); + _log.debug('Refreshing all USB devices'); _usbState = -1; _pollDevices(); }