diff --git a/android/src/main/kotlin/com/pravera/flutter_activity_recognition/service/ActivityRecognitionIntentService.kt b/android/src/main/kotlin/com/pravera/flutter_activity_recognition/service/ActivityRecognitionIntentService.kt index 7f71733..076c2c6 100644 --- a/android/src/main/kotlin/com/pravera/flutter_activity_recognition/service/ActivityRecognitionIntentService.kt +++ b/android/src/main/kotlin/com/pravera/flutter_activity_recognition/service/ActivityRecognitionIntentService.kt @@ -22,7 +22,7 @@ class ActivityRecognitionIntentService: JobIntentService() { override fun onHandleWork(intent: Intent) { val extractedResult = ActivityRecognitionResult.extractResult(intent) val probableActivities = extractedResult?.probableActivities - val mostProbableActivity = probableActivities?.maxBy { it.confidence } ?: return + val mostProbableActivity = probableActivities?.maxByOrNull { it.confidence } ?: return val activityData = ActivityData( ActivityRecognitionUtils.getActivityTypeFromValue(mostProbableActivity.type), diff --git a/pubspec.lock b/pubspec.lock index 4935c14..b482404 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,7 +7,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.8.1" + version: "2.8.2" boolean_selector: dependency: transitive description: @@ -21,7 +21,7 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.0" charcode: dependency: transitive description: @@ -66,7 +66,14 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10" + version: "0.12.11" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.3" meta: dependency: transitive description: @@ -127,7 +134,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.2" + version: "0.4.8" typed_data: dependency: transitive description: @@ -141,7 +148,7 @@ packages: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.1" sdks: - dart: ">=2.12.0 <3.0.0" + dart: ">=2.14.0 <3.0.0" flutter: ">=1.20.0"