diff --git a/.github/workflows/mobile.yml b/.github/workflows/mobile.yml
index 85ea82e8..8ff28dc1 100644
--- a/.github/workflows/mobile.yml
+++ b/.github/workflows/mobile.yml
@@ -24,6 +24,8 @@ jobs:
- run: flutter pub get
+ - run: flutter analyze
+
- run: flutter test
- run: flutter build apk
diff --git a/mobile/analysis_options.yaml b/mobile/analysis_options.yaml
new file mode 100644
index 00000000..fba11c7b
--- /dev/null
+++ b/mobile/analysis_options.yaml
@@ -0,0 +1,9 @@
+include: package:pedantic/analysis_options.yaml
+
+analyzer:
+ exclude:
+ - lib/protos
+
+linter:
+ rules:
+ avoid_shadowing_type_parameters: false
diff --git a/mobile/ios/Flutter/AppFrameworkInfo.plist b/mobile/ios/Flutter/AppFrameworkInfo.plist
index beffb28c..4f8d4d24 100644
--- a/mobile/ios/Flutter/AppFrameworkInfo.plist
+++ b/mobile/ios/Flutter/AppFrameworkInfo.plist
@@ -21,6 +21,6 @@
CFBundleVersion
1.0
MinimumOSVersion
- 10.0
+ 11.0
diff --git a/mobile/ios/Runner.xcodeproj/project.pbxproj b/mobile/ios/Runner.xcodeproj/project.pbxproj
index a81b9d8b..b6768355 100644
--- a/mobile/ios/Runner.xcodeproj/project.pbxproj
+++ b/mobile/ios/Runner.xcodeproj/project.pbxproj
@@ -272,7 +272,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 10.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@@ -354,7 +354,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 10.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@@ -403,7 +403,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 10.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
diff --git a/mobile/lib/src/application/device/device_selector_cubit.dart b/mobile/lib/src/application/device/device_selector_cubit.dart
index 7479a403..659a0006 100644
--- a/mobile/lib/src/application/device/device_selector_cubit.dart
+++ b/mobile/lib/src/application/device/device_selector_cubit.dart
@@ -5,6 +5,7 @@ import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:polydodo/src/domain/acquisition_device/acquisition_device.dart';
import 'package:polydodo/src/domain/acquisition_device/i_acquisition_device_repository.dart';
import 'package:streaming_shared_preferences/streaming_shared_preferences.dart';
+import 'package:pedantic/pedantic.dart';
import 'device_selector_state.dart';
class DeviceSelectorCubit extends Cubit {
@@ -21,13 +22,11 @@ class DeviceSelectorCubit extends Cubit {
void startSearching() {
_deviceRepository.initializeRepository();
- if (_acquisitionDeviceStream == null) {
- _acquisitionDeviceStream = _deviceRepository
- .watch()
- .asBroadcastStream()
- .listen((devices) => emit(DeviceSearchInProgress(devices)),
- onError: (e) => emit(DeviceSearchFailure(e)));
- }
+ _acquisitionDeviceStream ??= _deviceRepository
+ .watch()
+ .asBroadcastStream()
+ .listen((devices) => emit(DeviceSearchInProgress(devices)),
+ onError: (e) => emit(DeviceSearchFailure(e)));
}
Future connect(AcquisitionDevice device) async {
@@ -53,11 +52,9 @@ class DeviceSelectorCubit extends Cubit {
// todo: change bluetooth preferences in the preference section of the app
void swapBluetooth() async {
- print("swap");
usingBluetooth = !usingBluetooth;
- StreamingSharedPreferences _prefs =
- await StreamingSharedPreferences.instance;
+ var _prefs = await StreamingSharedPreferences.instance;
- _prefs.setBool('using_bluetooth', usingBluetooth);
+ unawaited(_prefs.setBool('using_bluetooth', usingBluetooth));
}
}
diff --git a/mobile/lib/src/domain/unique_id.dart b/mobile/lib/src/domain/unique_id.dart
index 56895b7e..28c03140 100644
--- a/mobile/lib/src/domain/unique_id.dart
+++ b/mobile/lib/src/domain/unique_id.dart
@@ -16,5 +16,5 @@ class UniqueId extends Equatable {
List