From ab3a06ddf2ded4cedb39c4452643d1e18871b939 Mon Sep 17 00:00:00 2001 From: Joonas Kerttula Date: Wed, 6 Nov 2024 10:41:00 +0200 Subject: [PATCH] chore: reformat kotlin code with new formatter --- .../google/maps/flutter/navigation/Convert.kt | 48 +- .../maps/flutter/navigation/GoogleMapView.kt | 2 +- .../navigation/GoogleMapsBaseMapView.kt | 51 +- .../GoogleMapsImageRegistryMessageHandler.kt | 2 +- .../GoogleMapsNavigationSessionManager.kt | 52 +- ...ogleMapsNavigationSessionMessageHandler.kt | 24 +- .../navigation/GoogleMapsNavigationView.kt | 2 +- .../navigation/GoogleMapsViewFactory.kt | 4 +- .../GoogleMapsViewMessageHandler.kt | 24 +- .../maps/flutter/navigation/ImageRegistry.kt | 8 +- .../flutter/navigation/MarkerController.kt | 2 +- .../navigation/NavigationViewConfiguration.kt | 4 +- .../maps/flutter/navigation/QueuedBitmap.kt | 2 +- .../flutter/navigation/RegisteredImage.kt | 2 +- .../maps/flutter/navigation/messages.g.kt | 535 ++++++++---------- .../flutter/navigation/CircleBuilderTest.kt | 2 +- .../navigation/CircleControllerTest.kt | 2 +- .../maps/flutter/navigation/ConvertTest.kt | 87 ++- .../flutter/navigation/MarkerBuilderTest.kt | 2 +- .../navigation/MarkerControllerTest.kt | 2 +- .../flutter/navigation/PolygonBuilderTest.kt | 2 +- .../navigation/PolygonControllerTest.kt | 2 +- .../flutter/navigation/PolylineBuilderTest.kt | 8 +- .../navigation/PolylineControllerTest.kt | 8 +- 24 files changed, 392 insertions(+), 485 deletions(-) diff --git a/android/src/main/kotlin/com/google/maps/flutter/navigation/Convert.kt b/android/src/main/kotlin/com/google/maps/flutter/navigation/Convert.kt index 9142ee7..f69e1a3 100644 --- a/android/src/main/kotlin/com/google/maps/flutter/navigation/Convert.kt +++ b/android/src/main/kotlin/com/google/maps/flutter/navigation/Convert.kt @@ -151,7 +151,7 @@ object Convert { position.bearing.toDouble(), LatLngDto(position.target.latitude, position.target.longitude), position.tilt.toDouble(), - position.zoom.toDouble() + position.zoom.toDouble(), ) } @@ -166,7 +166,7 @@ object Convert { convertLatLngFromDto(position.target), position.zoom.toFloat(), position.tilt.toFloat(), - position.bearing.toFloat() + position.bearing.toFloat(), ) } @@ -184,7 +184,7 @@ object Convert { focus = Point( convertLogicalToScreenPixel(dx, density).toInt(), - convertLogicalToScreenPixel(dy, density).toInt() + convertLogicalToScreenPixel(dy, density).toInt(), ) } return focus @@ -313,7 +313,7 @@ object Convert { convertLatLngToDto(waypoint.position), waypoint.placeId, waypoint.preferSameSideOfRoad, - waypoint.preferredHeading.takeIf { it != -1 }?.toLong() + waypoint.preferredHeading.takeIf { it != -1 }?.toLong(), ) } @@ -326,7 +326,7 @@ object Convert { fun convertTimeAndDistanceToDto(timeAndDistance: TimeAndDistance): NavigationTimeAndDistanceDto { return NavigationTimeAndDistanceDto( timeAndDistance.seconds.toDouble(), - timeAndDistance.meters.toDouble() + timeAndDistance.meters.toDouble(), ) } @@ -516,11 +516,11 @@ object Convert { .setSeverityUpgradeDurationSeconds(options.severityUpgradeDurationSeconds) .setSpeedAlertThresholdPercentage( SpeedAlertSeverity.MINOR, - options.minorSpeedAlertThresholdPercentage.toFloat() + options.minorSpeedAlertThresholdPercentage.toFloat(), ) .setSpeedAlertThresholdPercentage( SpeedAlertSeverity.MAJOR, - options.majorSpeedAlertThresholdPercentage.toFloat() + options.majorSpeedAlertThresholdPercentage.toFloat(), ) .build() } @@ -533,7 +533,7 @@ object Convert { fun sinkMarkerOptions( markerOptions: MarkerOptionsDto, sink: MarkerOptionsSink, - imageRegistry: ImageRegistry + imageRegistry: ImageRegistry, ) { sink.setAlpha(markerOptions.alpha.toFloat()) sink.setAnchor(markerOptions.anchor.u.toFloat(), markerOptions.anchor.v.toFloat()) @@ -542,7 +542,7 @@ object Convert { sink.setConsumeTapEvents(markerOptions.consumeTapEvents) sink.setInfoWindowAnchor( markerOptions.infoWindow.anchor.u.toFloat(), - markerOptions.infoWindow.anchor.v.toFloat() + markerOptions.infoWindow.anchor.v.toFloat(), ) sink.setPosition(LatLng(markerOptions.position.latitude, markerOptions.position.longitude)) sink.setRotation(markerOptions.rotation.toFloat()) @@ -584,16 +584,16 @@ object Convert { // Should never happen, added to suppress compiler warning. throw FlutterError( "nullTrafficDataRoadStretchRenderingDataListStyle", - "Traffic data road stretch rendering data list style is null" + "Traffic data road stretch rendering data list style is null", ) } } RouteSegmentTrafficDataRoadStretchRenderingDataDto( style, it.lengthMeters.toLong(), - it.offsetMeters.toLong() + it.offsetMeters.toLong(), ) - } + }, ) } @@ -602,7 +602,7 @@ object Convert { convertRouteSegmentTrafficDataToDto(segment.trafficData), LatLngDto(segment.destinationLatLng.latitude, segment.destinationLatLng.longitude), segment.latLngs.map { LatLngDto(it.latitude, it.longitude) }, - convertWaypointToDto(segment.destinationWaypoint) + convertWaypointToDto(segment.destinationWaypoint), ) } @@ -614,7 +614,7 @@ object Convert { fun sinkPolygonOptions( polygonOptions: PolygonOptionsDto, sink: PolygonOptionsSink, - density: Float + density: Float, ) { sink.setPoints(polygonOptions.points.filterNotNull().map { LatLng(it.latitude, it.longitude) }) sink.setHoles( @@ -650,7 +650,7 @@ object Convert { strokeWidth = convertScreenToLogicalPixel(polygon.strokeWidth.toDouble(), density), strokeColor = polygon.strokeColor.toLong(), visible = polygon.isVisible, - zIndex = polygon.zIndex.toDouble() + zIndex = polygon.zIndex.toDouble(), ) } @@ -677,12 +677,12 @@ object Convert { marker.snippet, MarkerAnchorDto( markerController.infoWindowAnchorU.toDouble(), - markerController.infoWindowAnchorV.toDouble() - ) + markerController.infoWindowAnchorV.toDouble(), + ), ), visible = marker.isVisible, zIndex = marker.zIndex.toDouble(), - icon = registeredImageToImageDescriptorDto(markerController.registeredImage) + icon = registeredImageToImageDescriptorDto(markerController.registeredImage), ) } @@ -700,7 +700,7 @@ object Convert { return StyleSpan( StrokeStyle.gradientBuilder(span.style.fromColor.toInt(), span.style.toColor.toInt()) .build(), - span.length + span.length, ) } return null @@ -785,7 +785,7 @@ object Convert { timeToCurrentStepSeconds = navInfo.timeToCurrentStepSeconds?.toLong(), timeToNextDestinationSeconds = navInfo.timeToNextDestinationSeconds?.toLong(), timeToFinalDestinationSeconds = navInfo.timeToFinalDestinationSeconds?.toLong(), - navState = convertNavState(navInfo.navState) + navState = convertNavState(navInfo.navState), ) } @@ -936,7 +936,7 @@ object Convert { fun sinkPolylineOptions( polylineOptions: PolylineOptionsDto, sink: PolylineOptionsSink, - density: Float + density: Float, ) { if (polylineOptions.points != null) { sink.setPoints( @@ -993,7 +993,7 @@ object Convert { strokePattern = polyline.pattern?.map { convertPatternItem(it) }, visible = polyline.isVisible, zIndex = polyline.zIndex.toDouble(), - spans = polyline.spans.map { convertStyleSpan(it) } + spans = polyline.spans.map { convertStyleSpan(it) }, ) } @@ -1031,7 +1031,7 @@ object Convert { fillColor = circle.fillColor.toLong(), zIndex = circle.zIndex.toDouble(), visible = circle.isVisible, - clickable = circle.isClickable + clickable = circle.isClickable, ) } @@ -1048,7 +1048,7 @@ object Convert { registeredImage.imageId, registeredImage.imagePixelRatio, registeredImage.width, - registeredImage.height + registeredImage.height, ) } else { // For default marker icon diff --git a/android/src/main/kotlin/com/google/maps/flutter/navigation/GoogleMapView.kt b/android/src/main/kotlin/com/google/maps/flutter/navigation/GoogleMapView.kt index 95ec8d5..55bc84f 100644 --- a/android/src/main/kotlin/com/google/maps/flutter/navigation/GoogleMapView.kt +++ b/android/src/main/kotlin/com/google/maps/flutter/navigation/GoogleMapView.kt @@ -29,7 +29,7 @@ internal constructor( viewId: Int, viewEventApi: ViewEventApi, private val viewRegistry: GoogleMapsViewRegistry, - imageRegistry: ImageRegistry + imageRegistry: ImageRegistry, ) : PlatformView, GoogleMapsBaseMapView(viewId, mapOptions, viewEventApi, imageRegistry) { private val _mapView: MapView = MapView(context, mapOptions) diff --git a/android/src/main/kotlin/com/google/maps/flutter/navigation/GoogleMapsBaseMapView.kt b/android/src/main/kotlin/com/google/maps/flutter/navigation/GoogleMapsBaseMapView.kt index 686a971..647e5d0 100644 --- a/android/src/main/kotlin/com/google/maps/flutter/navigation/GoogleMapsBaseMapView.kt +++ b/android/src/main/kotlin/com/google/maps/flutter/navigation/GoogleMapsBaseMapView.kt @@ -41,7 +41,7 @@ abstract class GoogleMapsBaseMapView( protected val viewId: Int, mapOptions: GoogleMapOptions, protected val viewEventApi: ViewEventApi, - private val imageRegistry: ImageRegistry + private val imageRegistry: ImageRegistry, ) { companion object { const val INVALIDATION_FRAME_SKIP_AMOUNT = 4 // Amount of skip frames before invalidation @@ -105,16 +105,10 @@ abstract class GoogleMapsBaseMapView( protected open fun initListeners() { getMap().setOnMapClickListener { - viewEventApi.onMapClickEvent( - viewId.toLong(), - LatLngDto(it.latitude, it.longitude), - ) {} + viewEventApi.onMapClickEvent(viewId.toLong(), LatLngDto(it.latitude, it.longitude)) {} } getMap().setOnMapLongClickListener { - viewEventApi.onMapLongClickEvent( - viewId.toLong(), - LatLngDto(it.latitude, it.longitude), - ) {} + viewEventApi.onMapLongClickEvent(viewId.toLong(), LatLngDto(it.latitude, it.longitude)) {} } getMap().setOnMarkerClickListener { marker -> val markerId = findMarkerId(marker) @@ -189,7 +183,7 @@ abstract class GoogleMapsBaseMapView( viewEventApi.onCameraChanged( viewId.toLong(), CameraEventTypeDto.ONCAMERASTARTEDFOLLOWINGLOCATION, - Convert.convertCameraPositionToDto(getMap().cameraPosition) + Convert.convertCameraPositionToDto(getMap().cameraPosition), ) {} } @@ -197,7 +191,7 @@ abstract class GoogleMapsBaseMapView( viewEventApi.onCameraChanged( viewId.toLong(), CameraEventTypeDto.ONCAMERASTOPPEDFOLLOWINGLOCATION, - Convert.convertCameraPositionToDto(getMap().cameraPosition) + Convert.convertCameraPositionToDto(getMap().cameraPosition), ) {} } } @@ -284,7 +278,7 @@ abstract class GoogleMapsBaseMapView( viewId.toLong(), markerId, eventType, - LatLngDto(marker.position.latitude, marker.position.longitude) + LatLngDto(marker.position.latitude, marker.position.longitude), ) {} } @@ -332,7 +326,7 @@ abstract class GoogleMapsBaseMapView( if (minZoomPreference > (_maxZoomLevelPreference ?: getMap().maxZoomLevel)) { throw FlutterError( "minZoomGreaterThanMaxZoom", - "Minimum zoom level cannot be greater than maximum zoom level" + "Minimum zoom level cannot be greater than maximum zoom level", ) } @@ -345,7 +339,7 @@ abstract class GoogleMapsBaseMapView( if (maxZoomPreference < (_minZoomLevelPreference ?: getMap().minZoomLevel)) { throw FlutterError( "maxZoomLessThanMinZoom", - "Maximum zoom level cannot be less than minimum zoom level" + "Maximum zoom level cannot be less than minimum zoom level", ) } @@ -427,7 +421,8 @@ abstract class GoogleMapsBaseMapView( // library for geolocation or implement separate method under // [GoogleMapsNavigationSessionManager] to fetch the location // using the [FusedLocationProviderApi]. - @Suppress("DEPRECATION") return getMap().myLocation + @Suppress("DEPRECATION") + return getMap().myLocation } fun getCameraPosition(): CameraPosition { @@ -453,7 +448,7 @@ abstract class GoogleMapsBaseMapView( private fun animateCamera( cameraUpdate: CameraUpdate, duration: Long?, - callback: (Result) -> Unit + callback: (Result) -> Unit, ) { // Native animateCamera() doesn't allow setting null duration so need to do two calls if (duration == null) { @@ -466,7 +461,7 @@ abstract class GoogleMapsBaseMapView( fun animateCameraToCameraPosition( cameraPosition: CameraPosition, duration: Long?, - callback: (Result) -> Unit + callback: (Result) -> Unit, ) { animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition), duration, callback) } @@ -479,7 +474,7 @@ abstract class GoogleMapsBaseMapView( bounds: LatLngBounds, padding: Double, duration: Long?, - callback: (Result) -> Unit + callback: (Result) -> Unit, ) { animateCamera(CameraUpdateFactory.newLatLngBounds(bounds, padding.toInt()), duration, callback) } @@ -488,7 +483,7 @@ abstract class GoogleMapsBaseMapView( point: LatLng, zoom: Double, duration: Long?, - callback: (Result) -> Unit + callback: (Result) -> Unit, ) { animateCamera(CameraUpdateFactory.newLatLngZoom(point, zoom.toFloat()), duration, callback) } @@ -497,12 +492,12 @@ abstract class GoogleMapsBaseMapView( scrollByDx: Double, scrollByDy: Double, duration: Long?, - callback: (Result) -> Unit + callback: (Result) -> Unit, ) { animateCamera( CameraUpdateFactory.scrollBy(scrollByDx.toFloat(), scrollByDy.toFloat()), duration, - callback + callback, ) } @@ -510,7 +505,7 @@ abstract class GoogleMapsBaseMapView( zoomBy: Double, focus: Point?, duration: Long?, - callback: (Result) -> Unit + callback: (Result) -> Unit, ) { // Native animateCamera() doesn't allow setting null duration or focus so need to split to // multiple calls @@ -599,7 +594,7 @@ abstract class GoogleMapsBaseMapView( Result.failure( FlutterError( "mapReadyCallbackAlreadyPending", - "A callback is already pending and cannot be overridden." + "A callback is already pending and cannot be overridden.", ) ) ) @@ -640,7 +635,7 @@ abstract class GoogleMapsBaseMapView( it.options.anchor.v.toFloat(), it.options.infoWindow.anchor.u.toFloat(), it.options.infoWindow.anchor.v.toFloat(), - registeredImage + registeredImage, ) _markers.add(controller) result.add(it) @@ -709,9 +704,7 @@ abstract class GoogleMapsBaseMapView( } } - fun addPolygons( - polygons: List, - ): List { + fun addPolygons(polygons: List): List { val density = Resources.getSystem().displayMetrics.density invalidateViewAfterMapLoad() val result = mutableListOf() @@ -778,9 +771,7 @@ abstract class GoogleMapsBaseMapView( } } - fun addPolylines( - polylines: List, - ): List { + fun addPolylines(polylines: List): List { val density = Resources.getSystem().displayMetrics.density invalidateViewAfterMapLoad() val result = mutableListOf() diff --git a/android/src/main/kotlin/com/google/maps/flutter/navigation/GoogleMapsImageRegistryMessageHandler.kt b/android/src/main/kotlin/com/google/maps/flutter/navigation/GoogleMapsImageRegistryMessageHandler.kt index b80c476..e29a9fe 100644 --- a/android/src/main/kotlin/com/google/maps/flutter/navigation/GoogleMapsImageRegistryMessageHandler.kt +++ b/android/src/main/kotlin/com/google/maps/flutter/navigation/GoogleMapsImageRegistryMessageHandler.kt @@ -23,7 +23,7 @@ class GoogleMapsImageRegistryMessageHandler(private val imageRegistry: ImageRegi bytes: ByteArray, imagePixelRatio: Double, width: Double?, - height: Double? + height: Double?, ): ImageDescriptorDto { return imageRegistry.registerBitmapImage(imageId, bytes, imagePixelRatio, width, height) } diff --git a/android/src/main/kotlin/com/google/maps/flutter/navigation/GoogleMapsNavigationSessionManager.kt b/android/src/main/kotlin/com/google/maps/flutter/navigation/GoogleMapsNavigationSessionManager.kt index 5f6fc89..b8a191f 100644 --- a/android/src/main/kotlin/com/google/maps/flutter/navigation/GoogleMapsNavigationSessionManager.kt +++ b/android/src/main/kotlin/com/google/maps/flutter/navigation/GoogleMapsNavigationSessionManager.kt @@ -150,7 +150,7 @@ private constructor(private val navigationSessionEventApi: NavigationSessionEven } else { throw FlutterError( "sessionNotInitialized", - "Cannot access navigation functionality before the navigation session has been initialized." + "Cannot access navigation functionality before the navigation session has been initialized.", ) } } @@ -164,7 +164,7 @@ private constructor(private val navigationSessionEventApi: NavigationSessionEven /** Creates Navigator instance. */ fun createNavigationSession( abnormalTerminationReportingEnabled: Boolean, - callback: (Result) -> Unit + callback: (Result) -> Unit, ) { if (navigator != null) { // Navigator is already initialized, just re-register listeners. @@ -181,7 +181,7 @@ private constructor(private val navigationSessionEventApi: NavigationSessionEven Result.failure( FlutterError( "termsNotAccepted", - "The session initialization failed, because the user has not yet accepted the navigation terms and conditions." + "The session initialization failed, because the user has not yet accepted the navigation terms and conditions.", ) ) ) @@ -208,7 +208,7 @@ private constructor(private val navigationSessionEventApi: NavigationSessionEven Result.failure( FlutterError( "notAuthorized", - "The session initialization failed, because the required Maps API key is empty or invalid." + "The session initialization failed, because the required Maps API key is empty or invalid.", ) ) ) @@ -218,7 +218,7 @@ private constructor(private val navigationSessionEventApi: NavigationSessionEven Result.failure( FlutterError( "termsNotAccepted", - "The session initialization failed, because the user has not yet accepted the navigation terms and conditions." + "The session initialization failed, because the user has not yet accepted the navigation terms and conditions.", ) ) ) @@ -228,7 +228,7 @@ private constructor(private val navigationSessionEventApi: NavigationSessionEven Result.failure( FlutterError( "networkError", - "The session initialization failed, because there is no working network connection." + "The session initialization failed, because there is no working network connection.", ) ) ) @@ -238,7 +238,7 @@ private constructor(private val navigationSessionEventApi: NavigationSessionEven Result.failure( FlutterError( "locationPermissionMissing", - "The session initialization failed, because the required location permission has not been granted." + "The session initialization failed, because the required location permission has not been granted.", ) ) ) @@ -262,7 +262,7 @@ private constructor(private val navigationSessionEventApi: NavigationSessionEven } else { throw FlutterError( "roadSnappedLocationProviderUnavailable", - "Could not get the road snapped location provider, activity not set." + "Could not get the road snapped location provider, activity not set.", ) } } @@ -317,7 +317,7 @@ private constructor(private val navigationSessionEventApi: NavigationSessionEven fun registerRemainingTimeOrDistanceChangedListener( remainingTimeThresholdSeconds: Long, - remainingDistanceThresholdMeters: Long + remainingDistanceThresholdMeters: Long, ) { if (remainingTimeOrDistanceChangedListener != null) { // Remove previously created listener to prevent @@ -330,7 +330,7 @@ private constructor(private val navigationSessionEventApi: NavigationSessionEven val timeAndDistance = getNavigator().currentTimeAndDistance navigationSessionEventApi.onRemainingTimeOrDistanceChanged( timeAndDistance.seconds.toDouble(), - timeAndDistance.meters.toDouble() + timeAndDistance.meters.toDouble(), ) {} } } @@ -339,7 +339,7 @@ private constructor(private val navigationSessionEventApi: NavigationSessionEven .addRemainingTimeOrDistanceChangedListener( remainingTimeThresholdSeconds.toInt(), remainingDistanceThresholdMeters.toInt(), - remainingTimeOrDistanceChangedListener + remainingTimeOrDistanceChangedListener, ) } @@ -376,7 +376,7 @@ private constructor(private val navigationSessionEventApi: NavigationSessionEven navigationSessionEventApi.onSpeedingUpdated( SpeedingUpdatedEventDto( percentageAboveLimit.toDouble(), - Convert.convertSpeedAlertSeverityFromDto(speedAlertSeverity) + Convert.convertSpeedAlertSeverityFromDto(speedAlertSeverity), ) ) {} } @@ -413,7 +413,7 @@ private constructor(private val navigationSessionEventApi: NavigationSessionEven routingOptions: RoutingOptions, displayOptions: DisplayOptions, routeTokenOptions: RouteTokenOptionsDto?, - callback: (Result) -> Unit + callback: (Result) -> Unit, ) { try { // If route toke options are present set token and travel mode if given. @@ -433,7 +433,7 @@ private constructor(private val navigationSessionEventApi: NavigationSessionEven throw FlutterError( "routeTokenMalformed", "The route token passed is malformed", - e.message + e.message, ) } @@ -510,7 +510,7 @@ private constructor(private val navigationSessionEventApi: NavigationSessionEven title: String, companyName: String, shouldOnlyShowDriverAwarenessDisclaimer: Boolean, - callback: (Result) -> Unit + callback: (Result) -> Unit, ) { // Align API behavior with iOS: // If the terms have already been accepted just return true straight away. @@ -527,7 +527,7 @@ private constructor(private val navigationSessionEventApi: NavigationSessionEven title, defaultParams, { accepted -> callback(Result.success(accepted)) }, - TermsAndConditionsCheckOption.SKIPPED + TermsAndConditionsCheckOption.SKIPPED, ) } else { NavigationApi.showTermsAndConditionsDialog(getActivity(), companyName, title) { accepted -> @@ -565,7 +565,7 @@ private constructor(private val navigationSessionEventApi: NavigationSessionEven } catch (error: IllegalStateException) { throw FlutterError( "termsResetNotAllowed", - "The terms acceptance cannot be reset while the navigation session is active." + "The terms acceptance cannot be reset while the navigation session is active.", ) } } @@ -612,7 +612,7 @@ private constructor(private val navigationSessionEventApi: NavigationSessionEven */ fun simulateLocationsAlongNewRoute( waypoints: List, - callback: (Result) -> Unit + callback: (Result) -> Unit, ) { try { getNavigator().simulator.simulateLocationsAlongNewRoute(waypoints).setOnResultListener { @@ -630,7 +630,7 @@ private constructor(private val navigationSessionEventApi: NavigationSessionEven fun simulateLocationsAlongNewRouteWithRoutingOptions( waypoints: List, routingOptions: RoutingOptions, - callback: (Result) -> Unit + callback: (Result) -> Unit, ) { try { getNavigator() @@ -650,7 +650,7 @@ private constructor(private val navigationSessionEventApi: NavigationSessionEven waypoints: List, routingOptions: RoutingOptions, simulationOptions: SimulationOptions, - callback: (Result) -> Unit + callback: (Result) -> Unit, ) { try { getNavigator() @@ -679,9 +679,7 @@ private constructor(private val navigationSessionEventApi: NavigationSessionEven } @Throws(FlutterError::class) - fun enableTurnByTurnNavigationEvents( - numNextStepsToPreview: Int, - ) { + fun enableTurnByTurnNavigationEvents(numNextStepsToPreview: Int) { var lifeCycleOwner: LifecycleOwner? = weakLifecycleOwner?.get() if (!turnByTurnEventsEnabled && lifeCycleOwner != null) { @@ -704,7 +702,7 @@ private constructor(private val navigationSessionEventApi: NavigationSessionEven .registerServiceForNavUpdates( getActivity().packageName, GoogleMapsNavigationNavUpdatesService::class.java.name, - options + options, ) if (success) { @@ -713,13 +711,13 @@ private constructor(private val navigationSessionEventApi: NavigationSessionEven } GoogleMapsNavigationNavUpdatesService.navInfoLiveData.observe( lifeCycleOwner, - navInfoObserver + navInfoObserver, ) turnByTurnEventsEnabled = true } else { throw FlutterError( "turnByTurnServiceError", - "Error while registering turn-by-turn updates service." + "Error while registering turn-by-turn updates service.", ) } } @@ -736,7 +734,7 @@ private constructor(private val navigationSessionEventApi: NavigationSessionEven } else { throw FlutterError( "turnByTurnServiceError", - "Error while unregistering turn-by-turn updates service." + "Error while unregistering turn-by-turn updates service.", ) } } diff --git a/android/src/main/kotlin/com/google/maps/flutter/navigation/GoogleMapsNavigationSessionMessageHandler.kt b/android/src/main/kotlin/com/google/maps/flutter/navigation/GoogleMapsNavigationSessionMessageHandler.kt index 027e2ea..219097f 100644 --- a/android/src/main/kotlin/com/google/maps/flutter/navigation/GoogleMapsNavigationSessionMessageHandler.kt +++ b/android/src/main/kotlin/com/google/maps/flutter/navigation/GoogleMapsNavigationSessionMessageHandler.kt @@ -27,7 +27,7 @@ class GoogleMapsNavigationSessionMessageHandler : NavigationSessionApi { override fun createNavigationSession( abnormalTerminationReportingEnabled: Boolean, - callback: (Result) -> Unit + callback: (Result) -> Unit, ) { manager().createNavigationSession(abnormalTerminationReportingEnabled, callback) } @@ -44,14 +44,14 @@ class GoogleMapsNavigationSessionMessageHandler : NavigationSessionApi { title: String, companyName: String, shouldOnlyShowDriverAwarenessDisclaimer: Boolean, - callback: (Result) -> Unit + callback: (Result) -> Unit, ) { manager() .showTermsAndConditionsDialog( title, companyName, shouldOnlyShowDriverAwarenessDisclaimer, - callback + callback, ) } @@ -81,7 +81,7 @@ class GoogleMapsNavigationSessionMessageHandler : NavigationSessionApi { override fun setDestinations( destinations: DestinationsDto, - callback: (Result) -> Unit + callback: (Result) -> Unit, ) { val waypoints = destinations.waypoints.filterNotNull().map { Convert.convertWaypointFromDto(it) } @@ -96,7 +96,7 @@ class GoogleMapsNavigationSessionMessageHandler : NavigationSessionApi { waypoints, routingOptions, displayOptions, - destinations.routeTokenOptions + destinations.routeTokenOptions, ) { if (it.isSuccess) { callback(Result.success(Convert.convertRouteStatusToDto(it.getOrThrow()))) @@ -176,7 +176,7 @@ class GoogleMapsNavigationSessionMessageHandler : NavigationSessionApi { override fun simulateLocationsAlongNewRoute( waypoints: List, - callback: (Result) -> Unit + callback: (Result) -> Unit, ) { val convertedWaypoints = waypoints.map { Convert.convertWaypointFromDto(it) } manager().simulateLocationsAlongNewRoute(convertedWaypoints) { @@ -194,12 +194,12 @@ class GoogleMapsNavigationSessionMessageHandler : NavigationSessionApi { override fun simulateLocationsAlongNewRouteWithRoutingOptions( waypoints: List, routingOptions: RoutingOptionsDto, - callback: (Result) -> Unit + callback: (Result) -> Unit, ) { val convertedWaypoints = waypoints.map { Convert.convertWaypointFromDto(it) } manager().simulateLocationsAlongNewRouteWithRoutingOptions( convertedWaypoints, - Convert.convertRoutingOptionsFromDto(routingOptions) + Convert.convertRoutingOptionsFromDto(routingOptions), ) { if (it.isSuccess) { callback(Result.success(Convert.convertRouteStatusToDto(it.getOrThrow()))) @@ -216,13 +216,13 @@ class GoogleMapsNavigationSessionMessageHandler : NavigationSessionApi { waypoints: List, routingOptions: RoutingOptionsDto, simulationOptions: SimulationOptionsDto, - callback: (Result) -> Unit + callback: (Result) -> Unit, ) { val convertedWaypoints = waypoints.map { Convert.convertWaypointFromDto(it) } manager().simulateLocationsAlongNewRouteWithRoutingAndSimulationOptions( convertedWaypoints, Convert.convertRoutingOptionsFromDto(routingOptions), - SimulationOptions().speedMultiplier(simulationOptions.speedMultiplier.toFloat()) + SimulationOptions().speedMultiplier(simulationOptions.speedMultiplier.toFloat()), ) { if (it.isSuccess) { callback(Result.success(Convert.convertRouteStatusToDto(it.getOrThrow()))) @@ -265,12 +265,12 @@ class GoogleMapsNavigationSessionMessageHandler : NavigationSessionApi { override fun registerRemainingTimeOrDistanceChangedListener( remainingTimeThresholdSeconds: Long, - remainingDistanceThresholdMeters: Long + remainingDistanceThresholdMeters: Long, ) { manager() .registerRemainingTimeOrDistanceChangedListener( remainingTimeThresholdSeconds, - remainingDistanceThresholdMeters + remainingDistanceThresholdMeters, ) } } diff --git a/android/src/main/kotlin/com/google/maps/flutter/navigation/GoogleMapsNavigationView.kt b/android/src/main/kotlin/com/google/maps/flutter/navigation/GoogleMapsNavigationView.kt index baf79f3..fb478e5 100644 --- a/android/src/main/kotlin/com/google/maps/flutter/navigation/GoogleMapsNavigationView.kt +++ b/android/src/main/kotlin/com/google/maps/flutter/navigation/GoogleMapsNavigationView.kt @@ -32,7 +32,7 @@ internal constructor( viewId: Int, private val viewRegistry: GoogleMapsViewRegistry, viewEventApi: ViewEventApi, - private val imageRegistry: ImageRegistry + private val imageRegistry: ImageRegistry, ) : PlatformView, GoogleMapsBaseMapView(viewId, mapOptions, viewEventApi, imageRegistry) { private val _navigationView: NavigationView = NavigationView(context, mapOptions) diff --git a/android/src/main/kotlin/com/google/maps/flutter/navigation/GoogleMapsViewFactory.kt b/android/src/main/kotlin/com/google/maps/flutter/navigation/GoogleMapsViewFactory.kt index 3776ac1..a680a4a 100644 --- a/android/src/main/kotlin/com/google/maps/flutter/navigation/GoogleMapsViewFactory.kt +++ b/android/src/main/kotlin/com/google/maps/flutter/navigation/GoogleMapsViewFactory.kt @@ -24,7 +24,7 @@ import io.flutter.plugin.platform.PlatformViewFactory class GoogleMapsViewFactory( private val viewRegistry: GoogleMapsViewRegistry, private val viewEventApi: ViewEventApi, - private val imageRegistry: ImageRegistry + private val imageRegistry: ImageRegistry, ) : PlatformViewFactory(StandardMessageCodec.INSTANCE) { override fun create(context: Context, viewId: Int, args: Any?): PlatformView { val params = ViewCreationOptionsDto.fromList(args as List) @@ -39,7 +39,7 @@ class GoogleMapsViewFactory( viewId, viewRegistry, viewEventApi, - imageRegistry + imageRegistry, ) } else { return GoogleMapView(context, mapOptions, viewId, viewEventApi, viewRegistry, imageRegistry) diff --git a/android/src/main/kotlin/com/google/maps/flutter/navigation/GoogleMapsViewMessageHandler.kt b/android/src/main/kotlin/com/google/maps/flutter/navigation/GoogleMapsViewMessageHandler.kt index a77c661..2215a6f 100644 --- a/android/src/main/kotlin/com/google/maps/flutter/navigation/GoogleMapsViewMessageHandler.kt +++ b/android/src/main/kotlin/com/google/maps/flutter/navigation/GoogleMapsViewMessageHandler.kt @@ -172,13 +172,13 @@ class GoogleMapsViewMessageHandler(private val viewRegistry: GoogleMapsViewRegis viewId: Long, cameraPosition: CameraPositionDto, duration: Long?, - callback: (Result) -> Unit + callback: (Result) -> Unit, ) { return getView(viewId.toInt()) .animateCameraToCameraPosition( Convert.convertCameraPositionFromDto(cameraPosition), duration, - callback + callback, ) } @@ -186,7 +186,7 @@ class GoogleMapsViewMessageHandler(private val viewRegistry: GoogleMapsViewRegis viewId: Long, point: LatLngDto, duration: Long?, - callback: (Result) -> Unit + callback: (Result) -> Unit, ) { return getView(viewId.toInt()) .animateCameraToLatLng(Convert.convertLatLngFromDto(point), duration, callback) @@ -197,7 +197,7 @@ class GoogleMapsViewMessageHandler(private val viewRegistry: GoogleMapsViewRegis bounds: LatLngBoundsDto, padding: Double, duration: Long?, - callback: (Result) -> Unit + callback: (Result) -> Unit, ) { val density = Resources.getSystem().displayMetrics.density return getView(viewId.toInt()) @@ -205,7 +205,7 @@ class GoogleMapsViewMessageHandler(private val viewRegistry: GoogleMapsViewRegis Convert.convertLatLngBoundsFromDto(bounds), Convert.convertLogicalToScreenPixel(padding, density), duration, - callback + callback, ) } @@ -214,7 +214,7 @@ class GoogleMapsViewMessageHandler(private val viewRegistry: GoogleMapsViewRegis point: LatLngDto, zoom: Double, duration: Long?, - callback: (Result) -> Unit + callback: (Result) -> Unit, ) { return getView(viewId.toInt()) .animateCameraToLatLngZoom(Convert.convertLatLngFromDto(point), zoom, duration, callback) @@ -225,7 +225,7 @@ class GoogleMapsViewMessageHandler(private val viewRegistry: GoogleMapsViewRegis scrollByDx: Double, scrollByDy: Double, duration: Long?, - callback: (Result) -> Unit + callback: (Result) -> Unit, ) { return getView(viewId.toInt()).animateCameraByScroll(scrollByDx, scrollByDy, duration, callback) } @@ -236,14 +236,14 @@ class GoogleMapsViewMessageHandler(private val viewRegistry: GoogleMapsViewRegis focusDx: Double?, focusDy: Double?, duration: Long?, - callback: (Result) -> Unit + callback: (Result) -> Unit, ) { return getView(viewId.toInt()) .animateCameraByZoom( zoomBy, Convert.convertDeltaToPoint(focusDx, focusDy), duration, - callback + callback, ) } @@ -251,7 +251,7 @@ class GoogleMapsViewMessageHandler(private val viewRegistry: GoogleMapsViewRegis viewId: Long, zoom: Double, duration: Long?, - callback: (Result) -> Unit + callback: (Result) -> Unit, ) { return getView(viewId.toInt()).animateCameraToZoom(zoom, duration, callback) } @@ -270,7 +270,7 @@ class GoogleMapsViewMessageHandler(private val viewRegistry: GoogleMapsViewRegis return getView(viewId.toInt()) .moveCameraToLatLngBounds( Convert.convertLatLngBoundsFromDto(bounds), - Convert.convertLogicalToScreenPixel(padding, density) + Convert.convertLogicalToScreenPixel(padding, density), ) } @@ -298,7 +298,7 @@ class GoogleMapsViewMessageHandler(private val viewRegistry: GoogleMapsViewRegis override fun followMyLocation( viewId: Long, perspective: CameraPerspectiveDto, - zoomLevel: Double? + zoomLevel: Double?, ) { val view = viewRegistry.getMapView(viewId.toInt()) view?.followMyLocation(Convert.convertCameraPerspectiveFromDto(perspective), zoomLevel) diff --git a/android/src/main/kotlin/com/google/maps/flutter/navigation/ImageRegistry.kt b/android/src/main/kotlin/com/google/maps/flutter/navigation/ImageRegistry.kt index 09de870..e128668 100644 --- a/android/src/main/kotlin/com/google/maps/flutter/navigation/ImageRegistry.kt +++ b/android/src/main/kotlin/com/google/maps/flutter/navigation/ImageRegistry.kt @@ -41,7 +41,7 @@ class ImageRegistry { bytes: ByteArray, imagePixelRatio: Double, width: Double?, - height: Double? + height: Double?, ): ImageDescriptorDto { val density = Resources.getSystem().displayMetrics.density val bitmap = createBitmap(bytes, imagePixelRatio, density, width, height) @@ -61,7 +61,7 @@ class ImageRegistry { bitmap: Bitmap, imagePixelRatio: Double, width: Double?, - height: Double? + height: Double?, ) { val bitmapDescriptor = BitmapDescriptorFactory.fromBitmap(bitmap) val registeredImage = RegisteredImage(imageId, bitmapDescriptor, imagePixelRatio, width, height) @@ -74,13 +74,13 @@ class ImageRegistry { imagePixelRatio: Double, density: Float, width: Double?, - height: Double? + height: Double?, ): Bitmap { val bitmap = BitmapFactory.decodeByteArray(bytes, 0, bytes.size) ?: throw FlutterError( "imageDecodingFailed", - "Failed to decode bitmap, is the byte array valid image?" + "Failed to decode bitmap, is the byte array valid image?", ) val scaledWidth: Double val scaledHeight: Double diff --git a/android/src/main/kotlin/com/google/maps/flutter/navigation/MarkerController.kt b/android/src/main/kotlin/com/google/maps/flutter/navigation/MarkerController.kt index 52632af..5173a63 100644 --- a/android/src/main/kotlin/com/google/maps/flutter/navigation/MarkerController.kt +++ b/android/src/main/kotlin/com/google/maps/flutter/navigation/MarkerController.kt @@ -28,7 +28,7 @@ class MarkerController( anchorV: Float, infoWindowAnchorU: Float, infoWindowAnchorV: Float, - registeredImage: RegisteredImage? + registeredImage: RegisteredImage?, ) : MarkerOptionsSink { var consumeTapEvents: Boolean = consumeTapEvents private set diff --git a/android/src/main/kotlin/com/google/maps/flutter/navigation/NavigationViewConfiguration.kt b/android/src/main/kotlin/com/google/maps/flutter/navigation/NavigationViewConfiguration.kt index bed74da..5e5bd97 100644 --- a/android/src/main/kotlin/com/google/maps/flutter/navigation/NavigationViewConfiguration.kt +++ b/android/src/main/kotlin/com/google/maps/flutter/navigation/NavigationViewConfiguration.kt @@ -26,6 +26,4 @@ enum class NavigationUIEnabledPreference { } /** Class for navigation view configuration options. */ -data class NavigationViewOptions( - val navigationUiEnabledPreference: NavigationUIEnabledPreference?, -) +data class NavigationViewOptions(val navigationUiEnabledPreference: NavigationUIEnabledPreference?) diff --git a/android/src/main/kotlin/com/google/maps/flutter/navigation/QueuedBitmap.kt b/android/src/main/kotlin/com/google/maps/flutter/navigation/QueuedBitmap.kt index c72b3e2..3ae6cdb 100644 --- a/android/src/main/kotlin/com/google/maps/flutter/navigation/QueuedBitmap.kt +++ b/android/src/main/kotlin/com/google/maps/flutter/navigation/QueuedBitmap.kt @@ -23,5 +23,5 @@ data class QueuedBitmap( val bitmap: Bitmap, val imagePixelRatio: Double, val width: Double?, - val height: Double? + val height: Double?, ) diff --git a/android/src/main/kotlin/com/google/maps/flutter/navigation/RegisteredImage.kt b/android/src/main/kotlin/com/google/maps/flutter/navigation/RegisteredImage.kt index 0985cfe..78878a7 100644 --- a/android/src/main/kotlin/com/google/maps/flutter/navigation/RegisteredImage.kt +++ b/android/src/main/kotlin/com/google/maps/flutter/navigation/RegisteredImage.kt @@ -23,5 +23,5 @@ data class RegisteredImage( val bitmapDescriptor: BitmapDescriptor, val imagePixelRatio: Double, val width: Double?, - val height: Double? + val height: Double?, ) diff --git a/android/src/main/kotlin/com/google/maps/flutter/navigation/messages.g.kt b/android/src/main/kotlin/com/google/maps/flutter/navigation/messages.g.kt index 1877061..7b2d19d 100644 --- a/android/src/main/kotlin/com/google/maps/flutter/navigation/messages.g.kt +++ b/android/src/main/kotlin/com/google/maps/flutter/navigation/messages.g.kt @@ -36,7 +36,7 @@ private fun wrapError(exception: Throwable): List { return listOf( exception.javaClass.simpleName, exception.toString(), - "Cause: " + exception.cause + ", Stacktrace: " + Log.getStackTraceString(exception) + "Cause: " + exception.cause + ", Stacktrace: " + Log.getStackTraceString(exception), ) } } @@ -45,7 +45,7 @@ private fun createConnectionError(channelName: String): FlutterError { return FlutterError( "channel-error", "Unable to establish connection on channel: '$channelName'.", - "" + "", ) } @@ -59,7 +59,7 @@ private fun createConnectionError(channelName: String): FlutterError { class FlutterError( val code: String, override val message: String? = null, - val details: Any? = null + val details: Any? = null, ) : Throwable() /** Describes the type of map to construct. */ @@ -541,7 +541,7 @@ data class MapOptionsDto( * Specifies a bounds to constrain the camera target, so that when users scroll and pan the map, * the camera target does not move outside these bounds. */ - val cameraTargetBounds: LatLngBoundsDto? = null + val cameraTargetBounds: LatLngBoundsDto? = null, ) { companion object { @Suppress("UNCHECKED_CAST") @@ -573,7 +573,7 @@ data class MapOptionsDto( minZoomPreference, maxZoomPreference, zoomControlsEnabled, - cameraTargetBounds + cameraTargetBounds, ) } } @@ -615,9 +615,7 @@ data class NavigationViewOptionsDto( } fun toList(): List { - return listOf( - navigationUIEnabledPreference.raw, - ) + return listOf(navigationUIEnabledPreference.raw) } } @@ -631,7 +629,7 @@ data class NavigationViewOptionsDto( data class ViewCreationOptionsDto( val mapViewType: MapViewTypeDto, val mapOptions: MapOptionsDto, - val navigationViewOptions: NavigationViewOptionsDto? = null + val navigationViewOptions: NavigationViewOptionsDto? = null, ) { companion object { @Suppress("UNCHECKED_CAST") @@ -645,11 +643,7 @@ data class ViewCreationOptionsDto( } fun toList(): List { - return listOf( - mapViewType.raw, - mapOptions.toList(), - navigationViewOptions?.toList(), - ) + return listOf(mapViewType.raw, mapOptions.toList(), navigationViewOptions?.toList()) } } @@ -658,7 +652,7 @@ data class CameraPositionDto( val bearing: Double, val target: LatLngDto, val tilt: Double, - val zoom: Double + val zoom: Double, ) { companion object { @Suppress("UNCHECKED_CAST") @@ -672,12 +666,7 @@ data class CameraPositionDto( } fun toList(): List { - return listOf( - bearing, - target.toList(), - tilt, - zoom, - ) + return listOf(bearing, target.toList(), tilt, zoom) } } @@ -686,7 +675,7 @@ data class MarkerDto( /** Identifies marker */ val markerId: String, /** Options for marker */ - val options: MarkerOptionsDto + val options: MarkerOptionsDto, ) { companion object { @Suppress("UNCHECKED_CAST") @@ -698,10 +687,7 @@ data class MarkerDto( } fun toList(): List { - return listOf( - markerId, - options.toList(), - ) + return listOf(markerId, options.toList()) } } @@ -717,7 +703,7 @@ data class MarkerOptionsDto( val infoWindow: InfoWindowDto, val visible: Boolean, val zIndex: Double, - val icon: ImageDescriptorDto + val icon: ImageDescriptorDto, ) { companion object { @Suppress("UNCHECKED_CAST") @@ -744,7 +730,7 @@ data class MarkerOptionsDto( infoWindow, visible, zIndex, - icon + icon, ) } } @@ -771,7 +757,7 @@ data class ImageDescriptorDto( val registeredImageId: String? = null, val imagePixelRatio: Double? = null, val width: Double? = null, - val height: Double? = null + val height: Double? = null, ) { companion object { @Suppress("UNCHECKED_CAST") @@ -785,12 +771,7 @@ data class ImageDescriptorDto( } fun toList(): List { - return listOf( - registeredImageId, - imagePixelRatio, - width, - height, - ) + return listOf(registeredImageId, imagePixelRatio, width, height) } } @@ -798,7 +779,7 @@ data class ImageDescriptorDto( data class InfoWindowDto( val title: String? = null, val snippet: String? = null, - val anchor: MarkerAnchorDto + val anchor: MarkerAnchorDto, ) { companion object { @Suppress("UNCHECKED_CAST") @@ -811,11 +792,7 @@ data class InfoWindowDto( } fun toList(): List { - return listOf( - title, - snippet, - anchor.toList(), - ) + return listOf(title, snippet, anchor.toList()) } } @@ -832,10 +809,7 @@ data class MarkerAnchorDto(val u: Double, val v: Double) { } fun toList(): List { - return listOf( - u, - v, - ) + return listOf(u, v) } } @@ -852,10 +826,7 @@ data class PolygonDto(val polygonId: String, val options: PolygonOptionsDto) { } fun toList(): List { - return listOf( - polygonId, - options.toList(), - ) + return listOf(polygonId, options.toList()) } } @@ -869,7 +840,7 @@ data class PolygonOptionsDto( val strokeColor: Long, val strokeWidth: Double, val visible: Boolean, - val zIndex: Double + val zIndex: Double, ) { companion object { @Suppress("UNCHECKED_CAST") @@ -892,7 +863,7 @@ data class PolygonOptionsDto( strokeColor, strokeWidth, visible, - zIndex + zIndex, ) } } @@ -924,9 +895,7 @@ data class PolygonHoleDto(val points: List) { } fun toList(): List { - return listOf( - points, - ) + return listOf(points) } } @@ -934,7 +903,7 @@ data class PolygonHoleDto(val points: List) { data class StyleSpanStrokeStyleDto( val solidColor: Long? = null, val fromColor: Long? = null, - val toColor: Long? = null + val toColor: Long? = null, ) { companion object { @Suppress("UNCHECKED_CAST") @@ -947,11 +916,7 @@ data class StyleSpanStrokeStyleDto( } fun toList(): List { - return listOf( - solidColor, - fromColor, - toColor, - ) + return listOf(solidColor, fromColor, toColor) } } @@ -968,10 +933,7 @@ data class StyleSpanDto(val length: Double, val style: StyleSpanStrokeStyleDto) } fun toList(): List { - return listOf( - length, - style.toList(), - ) + return listOf(length, style.toList()) } } @@ -988,10 +950,7 @@ data class PolylineDto(val polylineId: String, val options: PolylineOptionsDto) } fun toList(): List { - return listOf( - polylineId, - options.toList(), - ) + return listOf(polylineId, options.toList()) } } @@ -1008,10 +967,7 @@ data class PatternItemDto(val type: PatternTypeDto, val length: Double? = null) } fun toList(): List { - return listOf( - type.raw, - length, - ) + return listOf(type.raw, length) } } @@ -1026,7 +982,7 @@ data class PolylineOptionsDto( val strokeWidth: Double? = null, val visible: Boolean? = null, val zIndex: Double? = null, - val spans: List + val spans: List, ) { companion object { @Suppress("UNCHECKED_CAST") @@ -1052,7 +1008,7 @@ data class PolylineOptionsDto( strokeWidth, visible, zIndex, - spans + spans, ) } } @@ -1078,7 +1034,7 @@ data class CircleDto( /** Identifies circle. */ val circleId: String, /** Options for circle. */ - val options: CircleOptionsDto + val options: CircleOptionsDto, ) { companion object { @Suppress("UNCHECKED_CAST") @@ -1090,10 +1046,7 @@ data class CircleDto( } fun toList(): List { - return listOf( - circleId, - options.toList(), - ) + return listOf(circleId, options.toList()) } } @@ -1107,7 +1060,7 @@ data class CircleOptionsDto( val fillColor: Long, val zIndex: Double, val visible: Boolean, - val clickable: Boolean + val clickable: Boolean, ) { companion object { @Suppress("UNCHECKED_CAST") @@ -1130,7 +1083,7 @@ data class CircleOptionsDto( fillColor, zIndex, visible, - clickable + clickable, ) } } @@ -1163,10 +1116,7 @@ data class RouteTokenOptionsDto(val routeToken: String, val travelMode: TravelMo } fun toList(): List { - return listOf( - routeToken, - travelMode?.raw, - ) + return listOf(routeToken, travelMode?.raw) } } @@ -1175,7 +1125,7 @@ data class DestinationsDto( val waypoints: List, val displayOptions: NavigationDisplayOptionsDto, val routingOptions: RoutingOptionsDto? = null, - val routeTokenOptions: RouteTokenOptionsDto? = null + val routeTokenOptions: RouteTokenOptionsDto? = null, ) { companion object { @Suppress("UNCHECKED_CAST") @@ -1209,7 +1159,7 @@ data class RoutingOptionsDto( val avoidTolls: Boolean? = null, val avoidFerries: Boolean? = null, val avoidHighways: Boolean? = null, - val locationTimeoutMs: Long? = null + val locationTimeoutMs: Long? = null, ) { companion object { @Suppress("UNCHECKED_CAST") @@ -1232,7 +1182,7 @@ data class RoutingOptionsDto( avoidTolls, avoidFerries, avoidHighways, - locationTimeoutMs + locationTimeoutMs, ) } } @@ -1255,7 +1205,7 @@ data class RoutingOptionsDto( data class NavigationDisplayOptionsDto( val showDestinationMarkers: Boolean? = null, val showStopSigns: Boolean? = null, - val showTrafficLights: Boolean? = null + val showTrafficLights: Boolean? = null, ) { companion object { @Suppress("UNCHECKED_CAST") @@ -1268,11 +1218,7 @@ data class NavigationDisplayOptionsDto( } fun toList(): List { - return listOf( - showDestinationMarkers, - showStopSigns, - showTrafficLights, - ) + return listOf(showDestinationMarkers, showStopSigns, showTrafficLights) } } @@ -1282,7 +1228,7 @@ data class NavigationWaypointDto( val target: LatLngDto? = null, val placeID: String? = null, val preferSameSideOfRoad: Boolean? = null, - val preferredSegmentHeading: Long? = null + val preferredSegmentHeading: Long? = null, ) { companion object { @Suppress("UNCHECKED_CAST") @@ -1297,7 +1243,7 @@ data class NavigationWaypointDto( target, placeID, preferSameSideOfRoad, - preferredSegmentHeading + preferredSegmentHeading, ) } } @@ -1326,10 +1272,7 @@ data class NavigationTimeAndDistanceDto(val time: Double, val distance: Double) } fun toList(): List { - return listOf( - time, - distance, - ) + return listOf(time, distance) } } @@ -1337,7 +1280,7 @@ data class NavigationTimeAndDistanceDto(val time: Double, val distance: Double) data class NavigationAudioGuidanceSettingsDto( val isBluetoothAudioEnabled: Boolean? = null, val isVibrationEnabled: Boolean? = null, - val guidanceType: AudioGuidanceTypeDto? = null + val guidanceType: AudioGuidanceTypeDto? = null, ) { companion object { @Suppress("UNCHECKED_CAST") @@ -1349,17 +1292,13 @@ data class NavigationAudioGuidanceSettingsDto( return NavigationAudioGuidanceSettingsDto( isBluetoothAudioEnabled, isVibrationEnabled, - guidanceType + guidanceType, ) } } fun toList(): List { - return listOf( - isBluetoothAudioEnabled, - isVibrationEnabled, - guidanceType?.raw, - ) + return listOf(isBluetoothAudioEnabled, isVibrationEnabled, guidanceType?.raw) } } @@ -1375,9 +1314,7 @@ data class SimulationOptionsDto(val speedMultiplier: Double) { } fun toList(): List { - return listOf( - speedMultiplier, - ) + return listOf(speedMultiplier) } } @@ -1394,10 +1331,7 @@ data class LatLngDto(val latitude: Double, val longitude: Double) { } fun toList(): List { - return listOf( - latitude, - longitude, - ) + return listOf(latitude, longitude) } } @@ -1414,17 +1348,14 @@ data class LatLngBoundsDto(val southwest: LatLngDto, val northeast: LatLngDto) { } fun toList(): List { - return listOf( - southwest.toList(), - northeast.toList(), - ) + return listOf(southwest.toList(), northeast.toList()) } } /** Generated class from Pigeon that represents data sent in messages. */ data class SpeedingUpdatedEventDto( val percentageAboveLimit: Double, - val severity: SpeedAlertSeverityDto + val severity: SpeedAlertSeverityDto, ) { companion object { @Suppress("UNCHECKED_CAST") @@ -1436,10 +1367,7 @@ data class SpeedingUpdatedEventDto( } fun toList(): List { - return listOf( - percentageAboveLimit, - severity.raw, - ) + return listOf(percentageAboveLimit, severity.raw) } } @@ -1447,7 +1375,7 @@ data class SpeedingUpdatedEventDto( data class SpeedAlertOptionsDto( val severityUpgradeDurationSeconds: Double, val minorSpeedAlertThresholdPercentage: Double, - val majorSpeedAlertThresholdPercentage: Double + val majorSpeedAlertThresholdPercentage: Double, ) { companion object { @Suppress("UNCHECKED_CAST") @@ -1458,7 +1386,7 @@ data class SpeedAlertOptionsDto( return SpeedAlertOptionsDto( severityUpgradeDurationSeconds, minorSpeedAlertThresholdPercentage, - majorSpeedAlertThresholdPercentage + majorSpeedAlertThresholdPercentage, ) } } @@ -1476,7 +1404,7 @@ data class SpeedAlertOptionsDto( data class RouteSegmentTrafficDataRoadStretchRenderingDataDto( val style: RouteSegmentTrafficDataRoadStretchRenderingDataStyleDto, val lengthMeters: Long, - val offsetMeters: Long + val offsetMeters: Long, ) { companion object { @Suppress("UNCHECKED_CAST") @@ -1489,18 +1417,14 @@ data class RouteSegmentTrafficDataRoadStretchRenderingDataDto( } fun toList(): List { - return listOf( - style.raw, - lengthMeters, - offsetMeters, - ) + return listOf(style.raw, lengthMeters, offsetMeters) } } /** Generated class from Pigeon that represents data sent in messages. */ data class RouteSegmentTrafficDataDto( val status: RouteSegmentTrafficDataStatusDto, - val roadStretchRenderingDataList: List + val roadStretchRenderingDataList: List, ) { companion object { @Suppress("UNCHECKED_CAST") @@ -1513,10 +1437,7 @@ data class RouteSegmentTrafficDataDto( } fun toList(): List { - return listOf( - status.raw, - roadStretchRenderingDataList, - ) + return listOf(status.raw, roadStretchRenderingDataList) } } @@ -1525,7 +1446,7 @@ data class RouteSegmentDto( val trafficData: RouteSegmentTrafficDataDto? = null, val destinationLatLng: LatLngDto, val latLngs: List? = null, - val destinationWaypoint: NavigationWaypointDto? = null + val destinationWaypoint: NavigationWaypointDto? = null, ) { companion object { @Suppress("UNCHECKED_CAST") @@ -1560,7 +1481,7 @@ data class LaneDirectionDto( /** Shape for this lane direction. */ val laneShape: LaneShapeDto, /** Whether this lane is recommended. */ - val isRecommended: Boolean + val isRecommended: Boolean, ) { companion object { @Suppress("UNCHECKED_CAST") @@ -1572,10 +1493,7 @@ data class LaneDirectionDto( } fun toList(): List { - return listOf( - laneShape.raw, - isRecommended, - ) + return listOf(laneShape.raw, isRecommended) } } @@ -1600,9 +1518,7 @@ data class LaneDto( } fun toList(): List { - return listOf( - laneDirections, - ) + return listOf(laneDirections) } } @@ -1636,7 +1552,7 @@ data class StepInfoDto( /** The maneuver for this step. */ val maneuver: ManeuverDto, /** The index of the step in the list of all steps in the route. */ - val stepNumber: Long + val stepNumber: Long, ) { companion object { @Suppress("UNCHECKED_CAST") @@ -1663,7 +1579,7 @@ data class StepInfoDto( roundaboutTurnNumber, lanes, maneuver, - stepNumber + stepNumber, ) } } @@ -1725,7 +1641,7 @@ data class NavInfoDto( * * Android only. */ - val timeToNextDestinationSeconds: Long? = null + val timeToNextDestinationSeconds: Long? = null, ) { companion object { @Suppress("UNCHECKED_CAST") @@ -1753,7 +1669,7 @@ data class NavInfoDto( distanceToNextDestinationMeters, timeToCurrentStepSeconds, timeToFinalDestinationSeconds, - timeToNextDestinationSeconds + timeToNextDestinationSeconds, ) } } @@ -1845,6 +1761,7 @@ interface NavigationViewCreationApi { companion object { /** The codec used by NavigationViewCreationApi. */ val codec: MessageCodec by lazy { NavigationViewCreationApiCodec } + /** * Sets up an instance of `NavigationViewCreationApi` to handle messages through the * `binaryMessenger`. @@ -1856,7 +1773,7 @@ interface NavigationViewCreationApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.NavigationViewCreationApi.create", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -2085,14 +2002,14 @@ interface MapViewApi { viewId: Long, cameraPosition: CameraPositionDto, duration: Long?, - callback: (Result) -> Unit + callback: (Result) -> Unit, ) fun animateCameraToLatLng( viewId: Long, point: LatLngDto, duration: Long?, - callback: (Result) -> Unit + callback: (Result) -> Unit, ) fun animateCameraToLatLngBounds( @@ -2100,7 +2017,7 @@ interface MapViewApi { bounds: LatLngBoundsDto, padding: Double, duration: Long?, - callback: (Result) -> Unit + callback: (Result) -> Unit, ) fun animateCameraToLatLngZoom( @@ -2108,7 +2025,7 @@ interface MapViewApi { point: LatLngDto, zoom: Double, duration: Long?, - callback: (Result) -> Unit + callback: (Result) -> Unit, ) fun animateCameraByScroll( @@ -2116,7 +2033,7 @@ interface MapViewApi { scrollByDx: Double, scrollByDy: Double, duration: Long?, - callback: (Result) -> Unit + callback: (Result) -> Unit, ) fun animateCameraByZoom( @@ -2125,14 +2042,14 @@ interface MapViewApi { focusDx: Double?, focusDy: Double?, duration: Long?, - callback: (Result) -> Unit + callback: (Result) -> Unit, ) fun animateCameraToZoom( viewId: Long, zoom: Double, duration: Long?, - callback: (Result) -> Unit + callback: (Result) -> Unit, ) fun moveCameraToCameraPosition(viewId: Long, cameraPosition: CameraPositionDto) @@ -2252,6 +2169,7 @@ interface MapViewApi { companion object { /** The codec used by MapViewApi. */ val codec: MessageCodec by lazy { MapViewApiCodec } + /** Sets up an instance of `MapViewApi` to handle messages through the `binaryMessenger`. */ @Suppress("UNCHECKED_CAST") fun setUp(binaryMessenger: BinaryMessenger, api: MapViewApi?) { @@ -2260,7 +2178,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.awaitMapReady", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -2284,7 +2202,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.isMyLocationEnabled", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -2307,7 +2225,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.setMyLocationEnabled", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -2332,7 +2250,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.getMyLocation", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -2355,7 +2273,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.getMapType", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -2378,7 +2296,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.setMapType", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -2403,7 +2321,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.setMapStyle", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -2428,7 +2346,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.isNavigationTripProgressBarEnabled", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -2451,7 +2369,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.setNavigationTripProgressBarEnabled", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -2476,7 +2394,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.isNavigationHeaderEnabled", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -2499,7 +2417,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.setNavigationHeaderEnabled", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -2524,7 +2442,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.isNavigationFooterEnabled", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -2547,7 +2465,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.setNavigationFooterEnabled", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -2572,7 +2490,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.isRecenterButtonEnabled", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -2595,7 +2513,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.setRecenterButtonEnabled", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -2620,7 +2538,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.isSpeedLimitIconEnabled", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -2643,7 +2561,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.setSpeedLimitIconEnabled", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -2668,7 +2586,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.isSpeedometerEnabled", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -2691,7 +2609,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.setSpeedometerEnabled", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -2716,7 +2634,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.isTrafficIncidentCardsEnabled", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -2739,7 +2657,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.setTrafficIncidentCardsEnabled", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -2764,7 +2682,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.isNavigationUIEnabled", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -2787,7 +2705,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.setNavigationUIEnabled", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -2812,7 +2730,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.getCameraPosition", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -2835,7 +2753,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.getVisibleRegion", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -2858,7 +2776,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.followMyLocation", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -2884,7 +2802,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.animateCameraToCameraPosition", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -2912,7 +2830,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.animateCameraToLatLng", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -2939,7 +2857,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.animateCameraToLatLngBounds", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -2968,7 +2886,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.animateCameraToLatLngZoom", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -2997,7 +2915,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.animateCameraByScroll", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -3026,7 +2944,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.animateCameraByZoom", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -3056,7 +2974,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.animateCameraToZoom", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -3083,7 +3001,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.moveCameraToCameraPosition", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -3108,7 +3026,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.moveCameraToLatLng", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -3133,7 +3051,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.moveCameraToLatLngBounds", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -3159,7 +3077,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.moveCameraToLatLngZoom", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -3185,7 +3103,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.moveCameraByScroll", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -3211,7 +3129,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.moveCameraByZoom", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -3238,7 +3156,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.moveCameraToZoom", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -3263,7 +3181,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.showRouteOverview", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -3287,7 +3205,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.getMinZoomPreference", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -3310,7 +3228,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.getMaxZoomPreference", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -3333,7 +3251,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.resetMinMaxZoomPreference", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -3357,7 +3275,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.setMinZoomPreference", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -3382,7 +3300,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.setMaxZoomPreference", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -3407,7 +3325,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.setMyLocationButtonEnabled", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -3432,7 +3350,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.setConsumeMyLocationButtonClickEventsEnabled", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -3457,7 +3375,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.setZoomGesturesEnabled", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -3482,7 +3400,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.setZoomControlsEnabled", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -3507,7 +3425,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.setCompassEnabled", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -3532,7 +3450,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.setRotateGesturesEnabled", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -3557,7 +3475,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.setScrollGesturesEnabled", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -3582,7 +3500,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.setScrollGesturesDuringRotateOrZoomEnabled", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -3607,7 +3525,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.setTiltGesturesEnabled", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -3632,7 +3550,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.setMapToolbarEnabled", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -3657,7 +3575,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.setTrafficEnabled", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -3682,7 +3600,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.isMyLocationButtonEnabled", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -3705,7 +3623,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.isConsumeMyLocationButtonClickEventsEnabled", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -3728,7 +3646,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.isZoomGesturesEnabled", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -3751,7 +3669,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.isZoomControlsEnabled", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -3774,7 +3692,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.isCompassEnabled", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -3797,7 +3715,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.isRotateGesturesEnabled", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -3820,7 +3738,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.isScrollGesturesEnabled", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -3843,7 +3761,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.isScrollGesturesEnabledDuringRotateOrZoom", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -3866,7 +3784,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.isTiltGesturesEnabled", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -3889,7 +3807,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.isMapToolbarEnabled", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -3912,7 +3830,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.isTrafficEnabled", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -3935,7 +3853,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.getMarkers", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -3958,7 +3876,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.addMarkers", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -3982,7 +3900,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.updateMarkers", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -4006,7 +3924,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.removeMarkers", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -4031,7 +3949,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.clearMarkers", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -4055,7 +3973,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.clear", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -4079,7 +3997,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.getPolygons", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -4102,7 +4020,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.addPolygons", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -4126,7 +4044,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.updatePolygons", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -4150,7 +4068,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.removePolygons", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -4175,7 +4093,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.clearPolygons", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -4199,7 +4117,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.getPolylines", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -4222,7 +4140,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.addPolylines", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -4246,7 +4164,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.updatePolylines", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -4270,7 +4188,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.removePolylines", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -4295,7 +4213,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.clearPolylines", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -4319,7 +4237,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.getCircles", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -4342,7 +4260,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.addCircles", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -4366,7 +4284,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.updateCircles", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -4390,7 +4308,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.removeCircles", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -4415,7 +4333,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.clearCircles", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -4439,7 +4357,7 @@ interface MapViewApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.MapViewApi.registerOnCameraChangedListener", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -4498,7 +4416,7 @@ interface ImageRegistryApi { bytes: ByteArray, imagePixelRatio: Double, width: Double?, - height: Double? + height: Double?, ): ImageDescriptorDto fun unregisterImage(imageDescriptor: ImageDescriptorDto) @@ -4510,6 +4428,7 @@ interface ImageRegistryApi { companion object { /** The codec used by ImageRegistryApi. */ val codec: MessageCodec by lazy { ImageRegistryApiCodec } + /** * Sets up an instance of `ImageRegistryApi` to handle messages through the `binaryMessenger`. */ @@ -4520,7 +4439,7 @@ interface ImageRegistryApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.ImageRegistryApi.registerBitmapImage", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -4539,7 +4458,7 @@ interface ImageRegistryApi { bytesArg, imagePixelRatioArg, widthArg, - heightArg + heightArg, ) ) } catch (exception: Throwable) { @@ -4556,7 +4475,7 @@ interface ImageRegistryApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.ImageRegistryApi.unregisterImage", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -4580,7 +4499,7 @@ interface ImageRegistryApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.ImageRegistryApi.getRegisteredImages", - codec + codec, ) if (api != null) { channel.setMessageHandler { _, reply -> @@ -4601,7 +4520,7 @@ interface ImageRegistryApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.ImageRegistryApi.clearRegisteredImages", - codec + codec, ) if (api != null) { channel.setMessageHandler { _, reply -> @@ -4713,7 +4632,7 @@ class ViewEventApi(private val binaryMessenger: BinaryMessenger) { viewIdArg: Long, markerIdArg: String, eventTypeArg: MarkerEventTypeDto, - callback: (Result) -> Unit + callback: (Result) -> Unit, ) { val channelName = "dev.flutter.pigeon.google_navigation_flutter.ViewEventApi.onMarkerEvent" val channel = BasicMessageChannel(binaryMessenger, channelName, codec) @@ -4735,7 +4654,7 @@ class ViewEventApi(private val binaryMessenger: BinaryMessenger) { markerIdArg: String, eventTypeArg: MarkerDragEventTypeDto, positionArg: LatLngDto, - callback: (Result) -> Unit + callback: (Result) -> Unit, ) { val channelName = "dev.flutter.pigeon.google_navigation_flutter.ViewEventApi.onMarkerDragEvent" val channel = BasicMessageChannel(binaryMessenger, channelName, codec) @@ -4803,7 +4722,7 @@ class ViewEventApi(private val binaryMessenger: BinaryMessenger) { fun onNavigationUIEnabledChanged( viewIdArg: Long, navigationUIEnabledArg: Boolean, - callback: (Result) -> Unit + callback: (Result) -> Unit, ) { val channelName = "dev.flutter.pigeon.google_navigation_flutter.ViewEventApi.onNavigationUIEnabledChanged" @@ -4859,7 +4778,7 @@ class ViewEventApi(private val binaryMessenger: BinaryMessenger) { viewIdArg: Long, eventTypeArg: CameraEventTypeDto, positionArg: CameraPositionDto, - callback: (Result) -> Unit + callback: (Result) -> Unit, ) { val channelName = "dev.flutter.pigeon.google_navigation_flutter.ViewEventApi.onCameraChanged" val channel = BasicMessageChannel(binaryMessenger, channelName, codec) @@ -5013,7 +4932,7 @@ interface NavigationSessionApi { /** General. */ fun createNavigationSession( abnormalTerminationReportingEnabled: Boolean, - callback: (Result) -> Unit + callback: (Result) -> Unit, ) fun isInitialized(): Boolean @@ -5024,7 +4943,7 @@ interface NavigationSessionApi { title: String, companyName: String, shouldOnlyShowDriverAwarenessDisclaimer: Boolean, - callback: (Result) -> Unit + callback: (Result) -> Unit, ) fun areTermsAccepted(): Boolean @@ -5032,6 +4951,7 @@ interface NavigationSessionApi { fun resetTermsAccepted() fun getNavSDKVersion(): String + /** Navigation. */ fun isGuidanceRunning(): Boolean @@ -5056,6 +4976,7 @@ interface NavigationSessionApi { fun getTraveledRoute(): List fun getCurrentRouteSegment(): RouteSegmentDto? + /** Simulation */ fun setUserLocation(location: LatLngDto) @@ -5067,31 +4988,34 @@ interface NavigationSessionApi { fun simulateLocationsAlongNewRoute( waypoints: List, - callback: (Result) -> Unit + callback: (Result) -> Unit, ) fun simulateLocationsAlongNewRouteWithRoutingOptions( waypoints: List, routingOptions: RoutingOptionsDto, - callback: (Result) -> Unit + callback: (Result) -> Unit, ) fun simulateLocationsAlongNewRouteWithRoutingAndSimulationOptions( waypoints: List, routingOptions: RoutingOptionsDto, simulationOptions: SimulationOptionsDto, - callback: (Result) -> Unit + callback: (Result) -> Unit, ) fun pauseSimulation() fun resumeSimulation() + /** Simulation (iOS only) */ fun allowBackgroundLocationUpdates(allow: Boolean) + /** Road snapped location updates. */ fun enableRoadSnappedLocationUpdates() fun disableRoadSnappedLocationUpdates() + /** Enable Turn-by-Turn navigation events. */ fun enableTurnByTurnNavigationEvents(numNextStepsToPreview: Long?) @@ -5099,12 +5023,13 @@ interface NavigationSessionApi { fun registerRemainingTimeOrDistanceChangedListener( remainingTimeThresholdSeconds: Long, - remainingDistanceThresholdMeters: Long + remainingDistanceThresholdMeters: Long, ) companion object { /** The codec used by NavigationSessionApi. */ val codec: MessageCodec by lazy { NavigationSessionApiCodec } + /** * Sets up an instance of `NavigationSessionApi` to handle messages through the * `binaryMessenger`. @@ -5116,7 +5041,7 @@ interface NavigationSessionApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.NavigationSessionApi.createNavigationSession", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -5141,7 +5066,7 @@ interface NavigationSessionApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.NavigationSessionApi.isInitialized", - codec + codec, ) if (api != null) { channel.setMessageHandler { _, reply -> @@ -5162,7 +5087,7 @@ interface NavigationSessionApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.NavigationSessionApi.cleanup", - codec + codec, ) if (api != null) { channel.setMessageHandler { _, reply -> @@ -5184,7 +5109,7 @@ interface NavigationSessionApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.NavigationSessionApi.showTermsAndConditionsDialog", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -5195,7 +5120,7 @@ interface NavigationSessionApi { api.showTermsAndConditionsDialog( titleArg, companyNameArg, - shouldOnlyShowDriverAwarenessDisclaimerArg + shouldOnlyShowDriverAwarenessDisclaimerArg, ) { result: Result -> val error = result.exceptionOrNull() if (error != null) { @@ -5215,7 +5140,7 @@ interface NavigationSessionApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.NavigationSessionApi.areTermsAccepted", - codec + codec, ) if (api != null) { channel.setMessageHandler { _, reply -> @@ -5236,7 +5161,7 @@ interface NavigationSessionApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.NavigationSessionApi.resetTermsAccepted", - codec + codec, ) if (api != null) { channel.setMessageHandler { _, reply -> @@ -5258,7 +5183,7 @@ interface NavigationSessionApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.NavigationSessionApi.getNavSDKVersion", - codec + codec, ) if (api != null) { channel.setMessageHandler { _, reply -> @@ -5279,7 +5204,7 @@ interface NavigationSessionApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.NavigationSessionApi.isGuidanceRunning", - codec + codec, ) if (api != null) { channel.setMessageHandler { _, reply -> @@ -5300,7 +5225,7 @@ interface NavigationSessionApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.NavigationSessionApi.startGuidance", - codec + codec, ) if (api != null) { channel.setMessageHandler { _, reply -> @@ -5322,7 +5247,7 @@ interface NavigationSessionApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.NavigationSessionApi.stopGuidance", - codec + codec, ) if (api != null) { channel.setMessageHandler { _, reply -> @@ -5344,7 +5269,7 @@ interface NavigationSessionApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.NavigationSessionApi.setDestinations", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -5369,7 +5294,7 @@ interface NavigationSessionApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.NavigationSessionApi.clearDestinations", - codec + codec, ) if (api != null) { channel.setMessageHandler { _, reply -> @@ -5391,7 +5316,7 @@ interface NavigationSessionApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.NavigationSessionApi.continueToNextDestination", - codec + codec, ) if (api != null) { channel.setMessageHandler { _, reply -> @@ -5412,7 +5337,7 @@ interface NavigationSessionApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.NavigationSessionApi.getCurrentTimeAndDistance", - codec + codec, ) if (api != null) { channel.setMessageHandler { _, reply -> @@ -5433,7 +5358,7 @@ interface NavigationSessionApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.NavigationSessionApi.setAudioGuidance", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -5457,7 +5382,7 @@ interface NavigationSessionApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.NavigationSessionApi.setSpeedAlertOptions", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -5481,7 +5406,7 @@ interface NavigationSessionApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.NavigationSessionApi.getRouteSegments", - codec + codec, ) if (api != null) { channel.setMessageHandler { _, reply -> @@ -5502,7 +5427,7 @@ interface NavigationSessionApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.NavigationSessionApi.getTraveledRoute", - codec + codec, ) if (api != null) { channel.setMessageHandler { _, reply -> @@ -5523,7 +5448,7 @@ interface NavigationSessionApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.NavigationSessionApi.getCurrentRouteSegment", - codec + codec, ) if (api != null) { channel.setMessageHandler { _, reply -> @@ -5544,7 +5469,7 @@ interface NavigationSessionApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.NavigationSessionApi.setUserLocation", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -5568,7 +5493,7 @@ interface NavigationSessionApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.NavigationSessionApi.removeUserLocation", - codec + codec, ) if (api != null) { channel.setMessageHandler { _, reply -> @@ -5590,7 +5515,7 @@ interface NavigationSessionApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.NavigationSessionApi.simulateLocationsAlongExistingRoute", - codec + codec, ) if (api != null) { channel.setMessageHandler { _, reply -> @@ -5612,7 +5537,7 @@ interface NavigationSessionApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.NavigationSessionApi.simulateLocationsAlongExistingRouteWithOptions", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -5636,7 +5561,7 @@ interface NavigationSessionApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.NavigationSessionApi.simulateLocationsAlongNewRoute", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -5661,7 +5586,7 @@ interface NavigationSessionApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.NavigationSessionApi.simulateLocationsAlongNewRouteWithRoutingOptions", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -5688,7 +5613,7 @@ interface NavigationSessionApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.NavigationSessionApi.simulateLocationsAlongNewRouteWithRoutingAndSimulationOptions", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -5699,7 +5624,7 @@ interface NavigationSessionApi { api.simulateLocationsAlongNewRouteWithRoutingAndSimulationOptions( waypointsArg, routingOptionsArg, - simulationOptionsArg + simulationOptionsArg, ) { result: Result -> val error = result.exceptionOrNull() if (error != null) { @@ -5719,7 +5644,7 @@ interface NavigationSessionApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.NavigationSessionApi.pauseSimulation", - codec + codec, ) if (api != null) { channel.setMessageHandler { _, reply -> @@ -5741,7 +5666,7 @@ interface NavigationSessionApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.NavigationSessionApi.resumeSimulation", - codec + codec, ) if (api != null) { channel.setMessageHandler { _, reply -> @@ -5763,7 +5688,7 @@ interface NavigationSessionApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.NavigationSessionApi.allowBackgroundLocationUpdates", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -5787,7 +5712,7 @@ interface NavigationSessionApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.NavigationSessionApi.enableRoadSnappedLocationUpdates", - codec + codec, ) if (api != null) { channel.setMessageHandler { _, reply -> @@ -5809,7 +5734,7 @@ interface NavigationSessionApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.NavigationSessionApi.disableRoadSnappedLocationUpdates", - codec + codec, ) if (api != null) { channel.setMessageHandler { _, reply -> @@ -5831,7 +5756,7 @@ interface NavigationSessionApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.NavigationSessionApi.enableTurnByTurnNavigationEvents", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -5856,7 +5781,7 @@ interface NavigationSessionApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.NavigationSessionApi.disableTurnByTurnNavigationEvents", - codec + codec, ) if (api != null) { channel.setMessageHandler { _, reply -> @@ -5878,7 +5803,7 @@ interface NavigationSessionApi { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.NavigationSessionApi.registerRemainingTimeOrDistanceChangedListener", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> @@ -5891,7 +5816,7 @@ interface NavigationSessionApi { try { api.registerRemainingTimeOrDistanceChangedListener( remainingTimeThresholdSecondsArg, - remainingDistanceThresholdMetersArg + remainingDistanceThresholdMetersArg, ) wrapped = listOf(null) } catch (exception: Throwable) { @@ -6074,7 +5999,7 @@ class NavigationSessionEventApi(private val binaryMessenger: BinaryMessenger) { fun onRemainingTimeOrDistanceChanged( remainingTimeArg: Double, remainingDistanceArg: Double, - callback: (Result) -> Unit + callback: (Result) -> Unit, ) { val channelName = "dev.flutter.pigeon.google_navigation_flutter.NavigationSessionEventApi.onRemainingTimeOrDistanceChanged" @@ -6091,6 +6016,7 @@ class NavigationSessionEventApi(private val binaryMessenger: BinaryMessenger) { } } } + /** Android-only event. */ fun onTrafficUpdated(callback: (Result) -> Unit) { val channelName = @@ -6108,6 +6034,7 @@ class NavigationSessionEventApi(private val binaryMessenger: BinaryMessenger) { } } } + /** Android-only event. */ fun onRerouting(callback: (Result) -> Unit) { val channelName = @@ -6125,6 +6052,7 @@ class NavigationSessionEventApi(private val binaryMessenger: BinaryMessenger) { } } } + /** Android-only event. */ fun onGpsAvailabilityUpdate(availableArg: Boolean, callback: (Result) -> Unit) { val channelName = @@ -6142,6 +6070,7 @@ class NavigationSessionEventApi(private val binaryMessenger: BinaryMessenger) { } } } + /** Turn-by-Turn navigation events. */ fun onNavInfo(navInfoArg: NavInfoDto, callback: (Result) -> Unit) { val channelName = @@ -6160,6 +6089,7 @@ class NavigationSessionEventApi(private val binaryMessenger: BinaryMessenger) { } } } + /** Generated interface from Pigeon that represents a handler of messages from Flutter. */ interface NavigationInspector { fun isViewAttachedToSession(viewId: Long): Boolean @@ -6167,6 +6097,7 @@ interface NavigationInspector { companion object { /** The codec used by NavigationInspector. */ val codec: MessageCodec by lazy { StandardMessageCodec() } + /** * Sets up an instance of `NavigationInspector` to handle messages through the * `binaryMessenger`. @@ -6178,7 +6109,7 @@ interface NavigationInspector { BasicMessageChannel( binaryMessenger, "dev.flutter.pigeon.google_navigation_flutter.NavigationInspector.isViewAttachedToSession", - codec + codec, ) if (api != null) { channel.setMessageHandler { message, reply -> diff --git a/android/src/test/kotlin/com/google/maps/flutter/navigation/CircleBuilderTest.kt b/android/src/test/kotlin/com/google/maps/flutter/navigation/CircleBuilderTest.kt index 60d22bb..39ec195 100644 --- a/android/src/test/kotlin/com/google/maps/flutter/navigation/CircleBuilderTest.kt +++ b/android/src/test/kotlin/com/google/maps/flutter/navigation/CircleBuilderTest.kt @@ -33,7 +33,7 @@ internal class CircleBuilderTest { strokeWidth = 3.0, visible = true, strokePattern = emptyList(), - zIndex = 5.0 + zIndex = 5.0, ) val builder = CircleBuilder() Convert.sinkCircleOptions(optionsIn, builder, 1.0F) diff --git a/android/src/test/kotlin/com/google/maps/flutter/navigation/CircleControllerTest.kt b/android/src/test/kotlin/com/google/maps/flutter/navigation/CircleControllerTest.kt index 766a441..a7b5c37 100644 --- a/android/src/test/kotlin/com/google/maps/flutter/navigation/CircleControllerTest.kt +++ b/android/src/test/kotlin/com/google/maps/flutter/navigation/CircleControllerTest.kt @@ -42,7 +42,7 @@ internal class CircleControllerTest { strokeColor = Color.RED.toLong(), strokeWidth = 3.0, visible = true, - zIndex = 5.0 + zIndex = 5.0, ) val controller = CircleController(circle, "Circle_0") Convert.sinkCircleOptions(optionsIn, controller, 1.0F) diff --git a/android/src/test/kotlin/com/google/maps/flutter/navigation/ConvertTest.kt b/android/src/test/kotlin/com/google/maps/flutter/navigation/ConvertTest.kt index a5e8d04..ae3fb01 100644 --- a/android/src/test/kotlin/com/google/maps/flutter/navigation/ConvertTest.kt +++ b/android/src/test/kotlin/com/google/maps/flutter/navigation/ConvertTest.kt @@ -89,9 +89,9 @@ internal class ConvertTest { NavigationAudioGuidanceSettingsDto( isBluetoothAudioEnabled = false, isVibrationEnabled = false, - guidanceType = AudioGuidanceTypeDto.ALERTSANDGUIDANCE + guidanceType = AudioGuidanceTypeDto.ALERTSANDGUIDANCE, ) - ) + ), ) assertEquals( AudioGuidance.SILENT, @@ -99,9 +99,9 @@ internal class ConvertTest { NavigationAudioGuidanceSettingsDto( isBluetoothAudioEnabled = false, isVibrationEnabled = false, - guidanceType = AudioGuidanceTypeDto.SILENT + guidanceType = AudioGuidanceTypeDto.SILENT, ) - ) + ), ) assertEquals( AudioGuidance.VOICE_ALERTS_ONLY, @@ -109,9 +109,9 @@ internal class ConvertTest { NavigationAudioGuidanceSettingsDto( isBluetoothAudioEnabled = false, isVibrationEnabled = false, - guidanceType = AudioGuidanceTypeDto.ALERTSONLY + guidanceType = AudioGuidanceTypeDto.ALERTSONLY, ) - ) + ), ) assertEquals( AudioGuidance.VOICE_ALERTS_AND_GUIDANCE or AudioGuidance.VIBRATION, @@ -119,9 +119,9 @@ internal class ConvertTest { NavigationAudioGuidanceSettingsDto( isBluetoothAudioEnabled = false, isVibrationEnabled = true, - guidanceType = AudioGuidanceTypeDto.ALERTSANDGUIDANCE + guidanceType = AudioGuidanceTypeDto.ALERTSANDGUIDANCE, ) - ) + ), ) assertEquals( AudioGuidance.VOICE_ALERTS_AND_GUIDANCE or AudioGuidance.BLUETOOTH_AUDIO, @@ -129,9 +129,9 @@ internal class ConvertTest { NavigationAudioGuidanceSettingsDto( isBluetoothAudioEnabled = true, isVibrationEnabled = false, - guidanceType = AudioGuidanceTypeDto.ALERTSANDGUIDANCE + guidanceType = AudioGuidanceTypeDto.ALERTSANDGUIDANCE, ) - ) + ), ) } @@ -142,13 +142,13 @@ internal class ConvertTest { NavigationDisplayOptionsDto( showDestinationMarkers = false, showStopSigns = false, - showTrafficLights = false + showTrafficLights = false, ) val allTrue = NavigationDisplayOptionsDto( showDestinationMarkers = true, showStopSigns = true, - showTrafficLights = true + showTrafficLights = true, ) val convertedNone = Convert.convertDisplayOptionsFromDto(none) @@ -171,15 +171,15 @@ internal class ConvertTest { fun convertRoutingStrategy_returnsExpectedValue() { assertEquals( RoutingStrategy.DEFAULT_BEST, - Convert.convertRoutingStrategyFromDto(RoutingStrategyDto.DEFAULTBEST) + Convert.convertRoutingStrategyFromDto(RoutingStrategyDto.DEFAULTBEST), ) assertEquals( RoutingStrategy.SHORTER, - Convert.convertRoutingStrategyFromDto(RoutingStrategyDto.SHORTER) + Convert.convertRoutingStrategyFromDto(RoutingStrategyDto.SHORTER), ) assertEquals( RoutingStrategy.TARGET_DISTANCE, - Convert.convertRoutingStrategyFromDto(RoutingStrategyDto.DELTATOTARGETDISTANCE) + Convert.convertRoutingStrategyFromDto(RoutingStrategyDto.DELTATOTARGETDISTANCE), ) } @@ -187,15 +187,15 @@ internal class ConvertTest { fun convertAlternateRoutesStrategy_returnsExpectedValue() { assertEquals( AlternateRoutesStrategy.SHOW_ONE, - Convert.convertAlternateRoutesStrategyFromDto(AlternateRoutesStrategyDto.ONE) + Convert.convertAlternateRoutesStrategyFromDto(AlternateRoutesStrategyDto.ONE), ) assertEquals( AlternateRoutesStrategy.SHOW_ALL, - Convert.convertAlternateRoutesStrategyFromDto(AlternateRoutesStrategyDto.ALL) + Convert.convertAlternateRoutesStrategyFromDto(AlternateRoutesStrategyDto.ALL), ) assertEquals( AlternateRoutesStrategy.SHOW_NONE, - Convert.convertAlternateRoutesStrategyFromDto(AlternateRoutesStrategyDto.NONE) + Convert.convertAlternateRoutesStrategyFromDto(AlternateRoutesStrategyDto.NONE), ) } @@ -210,7 +210,7 @@ internal class ConvertTest { avoidTolls = true, avoidFerries = true, avoidHighways = true, - locationTimeoutMs = 5000 + locationTimeoutMs = 5000, ) val converted = Convert.convertRoutingOptionsFromDto(options) @@ -226,7 +226,7 @@ internal class ConvertTest { RoutingOptionsDto( AlternateRoutesStrategyDto.ONE, RoutingStrategyDto.DEFAULTBEST, - listOf(10, 100) + listOf(10, 100), ) val convertedWithTargetDistance = @@ -234,7 +234,7 @@ internal class ConvertTest { assertEquals( AlternateRoutesStrategy.SHOW_ONE, - convertedWithTargetDistance.alternateRoutesStrategy + convertedWithTargetDistance.alternateRoutesStrategy, ) assertEquals(RoutingStrategy.TARGET_DISTANCE, convertedWithTargetDistance.routingStrategy) assertEquals(listOf(10, 100), convertedWithTargetDistance.targetDistancesMeters) @@ -244,15 +244,15 @@ internal class ConvertTest { fun convertSpeedAlertSeverityNativeToPigeon_returnsExpectedValue() { assertEquals( SpeedAlertSeverityDto.NOTSPEEDING, - Convert.convertSpeedAlertSeverityFromDto(SpeedAlertSeverity.NONE) + Convert.convertSpeedAlertSeverityFromDto(SpeedAlertSeverity.NONE), ) assertEquals( SpeedAlertSeverityDto.MINOR, - Convert.convertSpeedAlertSeverityFromDto(SpeedAlertSeverity.MINOR) + Convert.convertSpeedAlertSeverityFromDto(SpeedAlertSeverity.MINOR), ) assertEquals( SpeedAlertSeverityDto.MAJOR, - Convert.convertSpeedAlertSeverityFromDto(SpeedAlertSeverity.MAJOR) + Convert.convertSpeedAlertSeverityFromDto(SpeedAlertSeverity.MAJOR), ) } @@ -260,15 +260,15 @@ internal class ConvertTest { fun convertSpeedAlertSeverityPigeonToNative_returnsExpectedValue() { assertEquals( SpeedAlertSeverity.NONE, - Convert.convertSpeedAlertSeverityFromDto(SpeedAlertSeverityDto.NOTSPEEDING) + Convert.convertSpeedAlertSeverityFromDto(SpeedAlertSeverityDto.NOTSPEEDING), ) assertEquals( SpeedAlertSeverity.MINOR, - Convert.convertSpeedAlertSeverityFromDto(SpeedAlertSeverityDto.MINOR) + Convert.convertSpeedAlertSeverityFromDto(SpeedAlertSeverityDto.MINOR), ) assertEquals( SpeedAlertSeverity.MAJOR, - Convert.convertSpeedAlertSeverityFromDto(SpeedAlertSeverityDto.MAJOR) + Convert.convertSpeedAlertSeverityFromDto(SpeedAlertSeverityDto.MAJOR), ) } @@ -279,16 +279,16 @@ internal class ConvertTest { assertEquals( Convert.convertSpeedAlertOptionsFromDto(testOptions) .getSpeedAlertThresholdPercentage(SpeedAlertSeverity.MINOR), - 40.0F + 40.0F, ) assertEquals( Convert.convertSpeedAlertOptionsFromDto(testOptions) .getSpeedAlertThresholdPercentage(SpeedAlertSeverity.MAJOR), - 80.0F + 80.0F, ) assertEquals( Convert.convertSpeedAlertOptionsFromDto(testOptions).severityUpgradeDurationSeconds, - 20.0 + 20.0, ) } @@ -331,7 +331,7 @@ internal class ConvertTest { val testLatLngBounds = LatLngBoundsDto( northeast = LatLngDto(latitude = 30.0, longitude = 20.0), - southwest = LatLngDto(latitude = 10.0, longitude = 40.0) + southwest = LatLngDto(latitude = 10.0, longitude = 40.0), ) val latLngBounds = Convert.convertLatLngBoundsFromDto(testLatLngBounds) @@ -367,11 +367,11 @@ internal class ConvertTest { cameraTargetBounds = LatLngBoundsDto( northeast = LatLngDto(latitude = 30.0, longitude = 20.0), - southwest = LatLngDto(latitude = 10.0, longitude = 40.0) + southwest = LatLngDto(latitude = 10.0, longitude = 40.0), ), minZoomPreference = 1.1, maxZoomPreference = 2.2, - zoomControlsEnabled = false + zoomControlsEnabled = false, ) val mapOptions = Convert.convertMapOptionsFromDto(testOptions) @@ -398,39 +398,36 @@ internal class ConvertTest { assertEquals( mapOptions.scrollGesturesEnabledDuringRotateOrZoom, - testOptions.scrollGesturesEnabledDuringRotateOrZoom + testOptions.scrollGesturesEnabledDuringRotateOrZoom, ) assertEquals(mapOptions.mapToolbarEnabled, testOptions.mapToolbarEnabled) assertEquals( mapOptions.latLngBoundsForCameraTarget.northeast.latitude, - testOptions.cameraTargetBounds?.northeast?.latitude + testOptions.cameraTargetBounds?.northeast?.latitude, ) assertEquals( mapOptions.latLngBoundsForCameraTarget.northeast.longitude, - testOptions.cameraTargetBounds?.northeast?.longitude + testOptions.cameraTargetBounds?.northeast?.longitude, ) assertEquals( mapOptions.latLngBoundsForCameraTarget.southwest.latitude, - testOptions.cameraTargetBounds?.southwest?.latitude + testOptions.cameraTargetBounds?.southwest?.latitude, ) assertEquals( mapOptions.latLngBoundsForCameraTarget.southwest.longitude, - testOptions.cameraTargetBounds?.southwest?.longitude + testOptions.cameraTargetBounds?.southwest?.longitude, ) assertEquals(mapOptions.minZoomPreference, testOptions.minZoomPreference?.toFloat()) assertEquals(mapOptions.maxZoomPreference, testOptions.maxZoomPreference?.toFloat()) - assertEquals( - mapOptions.zoomControlsEnabled, - testOptions.zoomControlsEnabled, - ) + assertEquals(mapOptions.zoomControlsEnabled, testOptions.zoomControlsEnabled) // Test nullable values val testOptions2 = @@ -457,15 +454,15 @@ internal class ConvertTest { assertEquals( trafficData.roadStretchRenderingDataList[0]!!.lengthMeters, - googleRenderingData.lengthMeters.toLong() + googleRenderingData.lengthMeters.toLong(), ) assertEquals( trafficData.roadStretchRenderingDataList[0]!!.offsetMeters, - googleRenderingData.offsetMeters.toLong() + googleRenderingData.offsetMeters.toLong(), ) assertEquals( trafficData.roadStretchRenderingDataList[0]!!.style.toString(), - googleRenderingData.style.toString() + googleRenderingData.style.toString(), ) } diff --git a/android/src/test/kotlin/com/google/maps/flutter/navigation/MarkerBuilderTest.kt b/android/src/test/kotlin/com/google/maps/flutter/navigation/MarkerBuilderTest.kt index 79132ea..53ff8ef 100644 --- a/android/src/test/kotlin/com/google/maps/flutter/navigation/MarkerBuilderTest.kt +++ b/android/src/test/kotlin/com/google/maps/flutter/navigation/MarkerBuilderTest.kt @@ -48,7 +48,7 @@ internal class MarkerBuilderTest { rotation = 40.0, visible = true, zIndex = 2.0, - icon = ImageDescriptorDto("default", 1.0) + icon = ImageDescriptorDto("default", 1.0), ) val builder = MarkerBuilder() Convert.sinkMarkerOptions(optionsIn, builder, imageRegistry) diff --git a/android/src/test/kotlin/com/google/maps/flutter/navigation/MarkerControllerTest.kt b/android/src/test/kotlin/com/google/maps/flutter/navigation/MarkerControllerTest.kt index cc9075a..ba4b9cb 100644 --- a/android/src/test/kotlin/com/google/maps/flutter/navigation/MarkerControllerTest.kt +++ b/android/src/test/kotlin/com/google/maps/flutter/navigation/MarkerControllerTest.kt @@ -52,7 +52,7 @@ internal class MarkerControllerTest { rotation = 40.0, visible = true, zIndex = 2.0, - icon = ImageDescriptorDto("default", 1.0) + icon = ImageDescriptorDto("default", 1.0), ) val controller = MarkerController(marker, "Marker_0", true, 0.1F, 0.2F, 0.3F, 0.4F, null) Convert.sinkMarkerOptions(optionsIn, controller, imageRegistry) diff --git a/android/src/test/kotlin/com/google/maps/flutter/navigation/PolygonBuilderTest.kt b/android/src/test/kotlin/com/google/maps/flutter/navigation/PolygonBuilderTest.kt index 3fa3b1a..8ef768a 100644 --- a/android/src/test/kotlin/com/google/maps/flutter/navigation/PolygonBuilderTest.kt +++ b/android/src/test/kotlin/com/google/maps/flutter/navigation/PolygonBuilderTest.kt @@ -33,7 +33,7 @@ internal class PolygonBuilderTest { strokeColor = Color.RED.toLong(), strokeWidth = 3.0, visible = true, - zIndex = 5.0 + zIndex = 5.0, ) val builder = PolygonBuilder() Convert.sinkPolygonOptions(optionsIn, builder, 1.0F) diff --git a/android/src/test/kotlin/com/google/maps/flutter/navigation/PolygonControllerTest.kt b/android/src/test/kotlin/com/google/maps/flutter/navigation/PolygonControllerTest.kt index ad92d6f..ba4e28f 100644 --- a/android/src/test/kotlin/com/google/maps/flutter/navigation/PolygonControllerTest.kt +++ b/android/src/test/kotlin/com/google/maps/flutter/navigation/PolygonControllerTest.kt @@ -42,7 +42,7 @@ internal class PolygonControllerTest { strokeColor = Color.RED.toLong(), strokeWidth = 3.0, visible = true, - zIndex = 5.0 + zIndex = 5.0, ) val controller = PolygonController(polygon, "Polygon_0") Convert.sinkPolygonOptions(optionsIn, controller, 1.0F) diff --git a/android/src/test/kotlin/com/google/maps/flutter/navigation/PolylineBuilderTest.kt b/android/src/test/kotlin/com/google/maps/flutter/navigation/PolylineBuilderTest.kt index 06c79e9..5ae628e 100644 --- a/android/src/test/kotlin/com/google/maps/flutter/navigation/PolylineBuilderTest.kt +++ b/android/src/test/kotlin/com/google/maps/flutter/navigation/PolylineBuilderTest.kt @@ -25,11 +25,7 @@ internal class PolylineBuilderTest { fun polylineBuilder_returnsExpectedValue() { val optionsIn = PolylineOptionsDto( - points = - listOf( - LatLngDto(50.0, 60.0), - LatLngDto(80.0, 90.0), - ), + points = listOf(LatLngDto(50.0, 60.0), LatLngDto(80.0, 90.0)), clickable = true, geodesic = true, strokeColor = Color.RED.toLong(), @@ -38,7 +34,7 @@ internal class PolylineBuilderTest { visible = true, strokePattern = emptyList(), zIndex = 5.0, - spans = emptyList() + spans = emptyList(), ) val builder = PolylineBuilder() Convert.sinkPolylineOptions(optionsIn, builder, 1.0F) diff --git a/android/src/test/kotlin/com/google/maps/flutter/navigation/PolylineControllerTest.kt b/android/src/test/kotlin/com/google/maps/flutter/navigation/PolylineControllerTest.kt index 1e16baa..49cf67b 100644 --- a/android/src/test/kotlin/com/google/maps/flutter/navigation/PolylineControllerTest.kt +++ b/android/src/test/kotlin/com/google/maps/flutter/navigation/PolylineControllerTest.kt @@ -35,11 +35,7 @@ internal class PolylineControllerTest { fun polylineController_callsExpectedFunctions() { val optionsIn = PolylineOptionsDto( - points = - listOf( - LatLngDto(50.0, 60.0), - LatLngDto(80.0, 90.0), - ), + points = listOf(LatLngDto(50.0, 60.0), LatLngDto(80.0, 90.0)), clickable = true, geodesic = true, strokeColor = Color.RED.toLong(), @@ -48,7 +44,7 @@ internal class PolylineControllerTest { visible = true, strokePattern = emptyList(), zIndex = 5.0, - spans = emptyList() + spans = emptyList(), ) val controller = PolylineController(polyline, "Polyline_0") Convert.sinkPolylineOptions(optionsIn, controller, 1.0F)