BidRanking class

How the bids the passenger sees are sorted.

The weights can add up to anything; they normalize themselves. Setting priceWeight: 1, etaWeight: 0 sorts by price only.

Annotations

Constructors

BidRanking({double priceWeight = 1.0, double etaWeight = 1.0, double ratingWeight = 0.5})
Creates a sorting criterion.
const

Properties

etaWeight → double
How much arriving soon weighs.
final
hashCode → int
The hash code for this object.
no setterinherited
priceWeight → double
How much being cheap weighs.
final
ratingWeight → double
How much the driver's rating weighs.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sort(List<DriverBid> bids, {DateTime? now}) → List<DriverBid>
Sorts the bids from best to worst.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited