RideRequest class
A passenger's request, with the price they propose.
It is the model of bidding apps —inDrive and the ones that copy it—, where the passenger names a price and drivers accept it or counter-offer, instead of the platform imposing the fare.
- Annotations
-
- @immutable
- @experimental
Constructors
-
RideRequest({required String id, required LatLng pickup, required LatLng dropoff, required int proposedFare, required String currency, required DateTime createdAt, double? estimatedDistanceMeters, Duration? estimatedDuration, int passengerCount = 1, String note = '', Set<
String> tags = const <String>{}}) -
Creates a request.
const
Properties
- createdAt → DateTime
-
When it was created.
final
- currency → String
-
The ISO 4217 currency code.
final
- dropoff → LatLng
-
Where the drop-off is.
final
- estimatedDistanceMeters → double?
-
The estimated trip distance, if the route has already been calculated.
final
- estimatedDuration → Duration?
-
The estimated trip duration.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
The request identifier.
final
- note → String
-
A free-form note from the passenger.
final
- passengerCount → int
-
How many people are traveling.
final
- pickup → LatLng
-
Where the pickup is.
final
- proposedFare → int
-
What the passenger offers, in minor units.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
Requirement tags: luggage, pet, child seat.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited