Skip to content

Commit a211741

Browse files
committed
fix: throw error on convertNavigationForceNightModeToDto for unknown types
1 parent 6b2d730 commit a211741

File tree

1 file changed

+2
-1
lines changed
  • android/src/main/kotlin/com/google/maps/flutter/navigation

1 file changed

+2
-1
lines changed

android/src/main/kotlin/com/google/maps/flutter/navigation/Convert.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,10 @@ object Convert {
333333
*/
334334
fun convertNavigationForceNightModeToDto(forceNightMode: Int): NavigationForceNightModeDto {
335335
return when (forceNightMode) {
336+
ForceNightMode.AUTO -> NavigationForceNightModeDto.AUTO
336337
ForceNightMode.FORCE_DAY -> NavigationForceNightModeDto.FORCE_DAY
337338
ForceNightMode.FORCE_NIGHT -> NavigationForceNightModeDto.FORCE_NIGHT
338-
else -> NavigationForceNightModeDto.AUTO
339+
else -> throw FlutterError("convertError", "Unknown ForceNightMode: $forceNightMode")
339340
}
340341
}
341342

0 commit comments

Comments
 (0)