Commit 28d9b54

derdilla <82763757+NobodyForNothing@users.noreply.github.com>
2024-05-18 07:30:03
add trace
Signed-off-by: derdilla <82763757+NobodyForNothing@users.noreply.github.com>
1 parent 0f6e90c
Changed files (3)
app/lib/bluetooth/ble_read_cubit.dart
@@ -48,6 +48,7 @@ class BleReadCubit extends Cubit<BleReadState> {
     late final List<BluetoothService> allServices;
     try {
       allServices = await _device.discoverServices();
+      Log.trace('allServices: $allServices');
     } catch (e) {
       Log.err('service discovery', [_device, e]);
       emit(BleReadFailure());
app/lib/bluetooth/device_scan_cubit.dart
@@ -72,6 +72,8 @@ class DeviceScanCubit extends Cubit<DeviceScanState> {
   }
 
   void _onScanResult(List<ScanResult> devices) {
+    Log.trace('_onScanResult devices: $devices');
+
     assert(_flutterBluePlus.isScanningNow);
     // No need to check whether the devices really support the searched
     // characteristic as users have to select their device anyways.
@@ -90,7 +92,7 @@ class DeviceScanCubit extends Cubit<DeviceScanState> {
   }
 
   void _onScanError(Object error) {
-    Log.err('Starting device scan failed');
+    Log.err('Starting device scan failed', [ error ]);
   }
 
   /// Mark a new device as known and switch to selected device state asap.
app/lib/screens/home_screen.dart
@@ -1,5 +1,6 @@
 import 'package:blood_pressure_app/components/dialoges/add_measurement_dialoge.dart';
 import 'package:blood_pressure_app/components/measurement_list/measurement_list.dart';
+import 'package:blood_pressure_app/logging.dart';
 import 'package:blood_pressure_app/model/blood_pressure/medicine/intake_history.dart';
 import 'package:blood_pressure_app/model/blood_pressure/model.dart';
 import 'package:blood_pressure_app/model/storage/intervall_store.dart';
@@ -26,6 +27,7 @@ class AppHome extends StatelessWidget {
 
   @override
   Widget build(BuildContext context) {
+    Log.trace('AppHome build');
     final localizations = AppLocalizations.of(context)!;
     // direct use of settings possible as no listening is required
     if (_appStart) {