Skip to content

Commit e80860f

Browse files
committed
fix: convert test with new defaults
1 parent 5deb828 commit e80860f

File tree

2 files changed

+4
-2
lines changed
  • android/src

2 files changed

+4
-2
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,7 @@ object Convert {
363363
*/
364364
fun convertDisplayOptionsFromDto(displayOptions: NavigationDisplayOptionsDto): DisplayOptions {
365365
return DisplayOptions().apply {
366+
// Only set if explicitly provided, otherwise SDK defaults are used.
366367
if (displayOptions.showDestinationMarkers != null) {
367368
this.hideDestinationMarkers(!displayOptions.showDestinationMarkers)
368369
}

android/src/test/kotlin/com/google/maps/flutter/navigation/ConvertTest.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,9 @@ internal class ConvertTest {
153153
)
154154

155155
val convertedNone = Convert.convertDisplayOptionsFromDto(none)
156-
assertEquals(false, convertedNone.showStopSigns)
157-
assertEquals(false, convertedNone.showTrafficLights)
156+
// When not specified, SDK defaults are used: stop signs and traffic lights are shown
157+
assertEquals(true, convertedNone.showStopSigns)
158+
assertEquals(true, convertedNone.showTrafficLights)
158159
assertEquals(false, convertedNone.hideDestinationMarkers)
159160

160161
val convertedAllFalse = Convert.convertDisplayOptionsFromDto(allFalse)

0 commit comments

Comments
 (0)