Skip to content

Commit

Permalink
fix: casing of names
Browse files Browse the repository at this point in the history
  • Loading branch information
SamadiPour committed Jan 10, 2023
1 parent 03a0b74 commit db114ff
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions lib/src/directions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -161,16 +161,16 @@ class TravelMode {
static final values = <TravelMode>[bicycling, driving, transit, walking];

/// Specifies a bicycling directions request.
static const bicycling = TravelMode('bicycling');
static const bicycling = TravelMode('BICYCLING');

/// Specifies a driving directions request.
static const driving = TravelMode('driving');
static const driving = TravelMode('DRIVING');

/// Specifies a transit directions request.
static const transit = TravelMode('transit');
static const transit = TravelMode('TRANSIT');

/// Specifies a walking directions request.
static const walking = TravelMode('walking');
static const walking = TravelMode('WALKING');

@override
int get hashCode => _name.hashCode;
Expand Down
12 changes: 6 additions & 6 deletions lib/src/directions.request.dart
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ class DirectionsRequest {
@override
String toString() => '?origin=${_convertLocation(origin)}&'
'destination=${_convertLocation(destination)}'
'${_addIfNotNull('mode', travelMode)}'
'${_addIfNotNull('mode', travelMode?.toString().toLowerCase())}'
'${_addIfNotNull('waypoints', _convertWaypoints())}'
'${_addIfNotNull('alternatives', alternatives)}'
'${_addIfNotNull('avoid', _convertAvoids())}'
Expand Down Expand Up @@ -628,23 +628,23 @@ class TransitMode {

/// Indicates that the calculated route should prefer travel
/// by bus.
static const bus = TransitMode('BUS');
static const bus = TransitMode('bus');

/// Indicates that the calculated route should prefer travel
/// by bus.
static const subway = TransitMode('SUBWAY');
static const subway = TransitMode('subway');

/// Indicates that the calculated route should prefer travel
/// by bus.
static const train = TransitMode('TRAIN');
static const train = TransitMode('train');

/// Indicates that the calculated route should prefer travel
/// by bus.
static const tram = TransitMode('TRAM');
static const tram = TransitMode('tram');

/// Indicates that the calculated route should prefer travel
/// by bus.
static const rail = TransitMode('RAIL');
static const rail = TransitMode('rail');

@override
String toString() => _name;
Expand Down

0 comments on commit db114ff

Please sign in to comment.