Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions lib/src/types/circles.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ class Circle {

@override
int get hashCode => Object.hash(circleId.hashCode, options.hashCode);

@override
String toString() => 'Circle(circleId: $circleId, options: $options)';
}

/// Defines CircleOptions for a circle.
Expand Down Expand Up @@ -157,6 +160,21 @@ class CircleOptions {
visible.hashCode,
zIndex.hashCode,
);

@override
String toString() =>
'CircleOptions('
'position: '
'$position, '
'radius: $radius, '
'strokeWidth: $strokeWidth, '
'strokeColor: $strokeColor, '
'strokePattern: $strokePattern, '
'fillColor: $fillColor, '
'zIndex: $zIndex, '
'visible: $visible, '
'clickable: $clickable'
')';
}

/// Event emitted when a circle is clicked.
Expand All @@ -169,4 +187,7 @@ class CircleClickedEvent {

/// Id of the circle that has been tapped.
final String circleId;

@override
String toString() => 'CircleClickedEvent(circleId: $circleId)';
}
9 changes: 9 additions & 0 deletions lib/src/types/images.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,13 @@ class ImageDescriptor {
width.hashCode,
height.hashCode,
);

@override
String toString() =>
'ImageDescriptor('
'registeredImageId: $registeredImageId, '
'imagePixelRatio: $imagePixelRatio, '
'width: $width, '
'height: $height'
')';
}
3 changes: 3 additions & 0 deletions lib/src/types/lat_lng.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,7 @@ class LatLng {

@override
int get hashCode => Object.hash(latitude.hashCode, longitude.hashCode);

@override
String toString() => 'LatLng(latitude: $latitude, longitude: $longitude)';
}
4 changes: 4 additions & 0 deletions lib/src/types/lat_lng_bounds.dart
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,8 @@ class LatLngBounds {

@override
int get hashCode => Object.hash(southwest.hashCode, northeast.hashCode);

@override
String toString() =>
'LatLngBounds(southwest: $southwest, northeast: $northeast)';
}
38 changes: 38 additions & 0 deletions lib/src/types/markers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ class Marker {

@override
int get hashCode => Object.hash(markerId.hashCode, options.hashCode);

@override
String toString() => 'Marker(markerId: $markerId, options: $options)';
}

/// Defines MarkerOptions for a marker.
Expand Down Expand Up @@ -198,6 +201,22 @@ class MarkerOptions {
visible.hashCode,
zIndex.hashCode,
);

@override
String toString() =>
'MarkerOptions('
'alpha: $alpha, '
'anchor: $anchor, '
'draggable: $draggable, '
'flat: $flat, '
'icon: $icon, '
'consumeTapEvents: $consumeTapEvents, '
'position: $position, '
'rotation: $rotation, '
'infoWindow: $infoWindow, '
'visible: $visible, '
'zIndex: $zIndex'
')';
}

/// Text labels for [Marker] info window.
Expand Down Expand Up @@ -247,6 +266,10 @@ class InfoWindow {
@override
int get hashCode =>
Object.hash(title.hashCode, snippet.hashCode, anchor.hashCode);

@override
String toString() =>
'InfoWindow(title: $title, snippet: $snippet, anchor: $anchor)';
}

/// Specifies the anchor to be at a particular point in the marker image.
Expand Down Expand Up @@ -276,6 +299,9 @@ class MarkerAnchor {

@override
int get hashCode => Object.hash(u.hashCode, v.hashCode);

@override
String toString() => 'MarkerAnchor(u: $u, v: $v)';
}

/// Marker event types
Expand Down Expand Up @@ -322,6 +348,10 @@ class MarkerEvent {

/// Type of the event.
final MarkerEventType eventType;

@override
String toString() =>
'MarkerEvent(markerId: $markerId, eventType: $eventType)';
}

/// Marker drag event sent from platform side.
Expand All @@ -344,4 +374,12 @@ class MarkerDragEvent {

/// Type of the event.
final MarkerDragEventType eventType;

@override
String toString() =>
'MarkerDragEvent('
'markerId: $markerId, '
'eventType: $eventType, '
'position: $position'
')';
}
56 changes: 56 additions & 0 deletions lib/src/types/navigation_destinations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@ class Destinations {

/// Navigation route token options.
final RouteTokenOptions? routeTokenOptions;

@override
String toString() =>
'Destinations('
'waypoints: $waypoints, '
'displayOptions: $displayOptions, '
'routingOptions: $routingOptions, '
'routeTokenOptions: $routeTokenOptions'
')';
}

/// Provides options for routing using a route token
Expand Down Expand Up @@ -70,6 +79,10 @@ class RouteTokenOptions {
/// If there is a mismatch, [travelMode] will override the travel mode used to
/// generate the [routeToken].
final NavigationTravelMode? travelMode;

@override
String toString() =>
'RouteTokenOptions(routeToken: $routeToken, travelMode: $travelMode)';
}

/// Alternative routes strategy.
Expand Down Expand Up @@ -155,6 +168,19 @@ class RoutingOptions {

/// Maximum time to wait for a location fix before failure. (Only Android)
final int? locationTimeoutMs;

@override
String toString() =>
'RoutingOptions('
'alternateRoutesStrategy: $alternateRoutesStrategy, '
'routingStrategy: $routingStrategy, '
'targetDistanceMeters: $targetDistanceMeters, '
'travelMode: $travelMode, '
'avoidTolls: $avoidTolls, '
'avoidFerries: $avoidFerries, '
'avoidHighways: $avoidHighways, '
'locationTimeoutMs: $locationTimeoutMs'
')';
}

/// Display options.
Expand All @@ -178,6 +204,14 @@ class NavigationDisplayOptions {

/// Show traffic lights.
final bool? showTrafficLights;

@override
String toString() =>
'NavigationDisplayOptions('
'showDestinationMarkers: $showDestinationMarkers, '
'showStopSigns: $showStopSigns, '
'showTrafficLights: $showTrafficLights'
')';
}

/// Navigation waypoint with different constructors based in on type of
Expand Down Expand Up @@ -248,6 +282,16 @@ class NavigationWaypoint {
/// has a lane direction that aligns (within +/- 55 degrees) with the side of
/// the road that the waypoint is on.
int? preferredSegmentHeading;

@override
String toString() =>
'NavigationWaypoint('
'title: $title, '
'target: $target, '
'placeID: $placeID, '
'preferSameSideOfRoad: $preferSameSideOfRoad, '
'preferredSegmentHeading: $preferredSegmentHeading'
')';
}

/// Status of the navigation routing.
Expand Down Expand Up @@ -310,6 +354,10 @@ class NavigationTimeAndDistance {

/// Distance to destination.
final double distance;

@override
String toString() =>
'NavigationTimeAndDistance(time: $time, distance: $distance)';
}

/// Navigation audio guidance type.
Expand Down Expand Up @@ -343,4 +391,12 @@ class NavigationAudioGuidanceSettings {

/// Guidance type.
final NavigationAudioGuidanceType? guidanceType;

@override
String toString() =>
'NavigationAudioGuidanceSettings('
'isBluetoothAudioEnabled: $isBluetoothAudioEnabled, '
'isVibrationEnabled: $isVibrationEnabled, '
'guidanceType: $guidanceType'
')';
}
71 changes: 71 additions & 0 deletions lib/src/types/navigation_view_types.dart
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,15 @@ class CameraPosition {

/// Zoom level near the center of the screen.
final double zoom;

@override
String toString() =>
'CameraPosition('
'bearing: $bearing, '
'target: $target, '
'tilt: $tilt, '
'zoom: $zoom'
')';
}

/// Parameter given to parameter given to the [GoogleNavigationViewController.followMyLocation]
Expand All @@ -97,12 +106,19 @@ class CustomNavigationAutoEvent {
final Object? data;

CustomNavigationAutoEvent({required this.event, required this.data});

@override
String toString() => 'CustomNavigationAutoEvent(event: $event, data: $data)';
}

class AutoScreenAvailabilityChangedEvent {
final bool isAvailable;

AutoScreenAvailabilityChangedEvent({required this.isAvailable});

@override
String toString() =>
'AutoScreenAvailabilityChangedEvent(isAvailable: $isAvailable)';
}

/// Represents the click position in a Google Maps view.
Expand All @@ -114,6 +130,9 @@ class MapClickEvent {

/// The location where the click happened.
final LatLng target;

@override
String toString() => 'MapClickEvent(target: $target)';
}

/// Represents navigation UI changed event in a view.
Expand All @@ -124,6 +143,12 @@ class NavigationUIEnabledChangedEvent {

/// Value representing whether UI changed or not.
final bool navigationUIEnabled;

@override
String toString() =>
'NavigationUIEnabledChangedEvent('
'navigationUIEnabled: $navigationUIEnabled'
')';
}

/// Represents the long click position in a Google Maps view.
Expand All @@ -135,6 +160,9 @@ class MapLongClickEvent {

/// The location where the long click happened.
final LatLng target;

@override
String toString() => 'MapLongClickEvent(target: $target)';
}

/// Traffic data statuses
Expand Down Expand Up @@ -165,6 +193,14 @@ class RouteSegmentTrafficDataRoadStretchRenderingData {

/// Offset in meters.
final int offsetMeters;

@override
String toString() =>
'RouteSegmentTrafficDataRoadStretchRenderingData('
'style: $style, '
'lengthMeters: $lengthMeters, '
'offsetMeters: $offsetMeters'
')';
}

/// Route segment traffic data road strech rendering style.
Expand Down Expand Up @@ -195,6 +231,13 @@ class RouteSegmentTrafficData {
/// Rendering data list.
final List<RouteSegmentTrafficDataRoadStretchRenderingData?>
roadStretchRenderingDataList;

@override
String toString() =>
'RouteSegmentTrafficData('
'status: $status, '
'roadStretchRenderingDataList: $roadStretchRenderingDataList'
')';
}

/// Navigation route segment
Expand All @@ -220,6 +263,15 @@ class RouteSegment {

/// Destination waypoint.
final NavigationWaypoint? destinationWaypoint;

@override
String toString() =>
'RouteSegment('
'trafficData: $trafficData, '
'destinationLatLng: $destinationLatLng, '
'latLngs: $latLngs, '
'destinationWaypoint: $destinationWaypoint'
')';
}

/// Internal camera update type.
Expand Down Expand Up @@ -396,6 +448,21 @@ class CameraUpdate {

/// The screen position co-ordinates for the zoom-by camera.
Offset? focus;

@override
String toString() =>
'CameraUpdate('
'type: $type, '
'cameraPosition: $cameraPosition, '
'latLng: $latLng, '
'bounds: $bounds, '
'padding: $padding, '
'zoom: $zoom, '
'zoomByAmount: $zoomByAmount, '
'scrollByDx: $scrollByDx, '
'scrollByDy: $scrollByDy, '
'focus: $focus'
')';
}

/// My location clicked event.
Expand Down Expand Up @@ -444,4 +511,8 @@ class CameraChangedEvent {

/// Current position of the camera.
final CameraPosition position;

@override
String toString() =>
'CameraChangedEvent(eventType: $eventType, position: $position)';
}
Loading
Loading