TaxiFareFinder class
A wrapper for the TaxiFareFinder API
Installing
Use pub to install this package. Add the following to your
pubspec.yaml
file.
dependencies:
taxifarefinder: any
Then run pub install
.
For more information, see the taxifarefinder package on pub.dartlang.org.
Usage
Import the library
import 'package:taxifarefinder/taxifarefinder.dart';
Create a TaxiFareFinder instance
var taxiFareFinder = TaxiFareFinder('<YOUR API KEY>');
The TaxiFareFinder API key can be requested under https://www.taxifarefinder.com/contactus.php
Constructors
- TaxiFareFinder(String apiKey)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getFare(
double? originLat, double? originLng, double? destinationLat, double? destinationLng, {String? city = '', TffTraffic? traffic = TffTraffic.medium, int? maxDistance = 80467}) → Future< TffFare> - Retrieves the fare information from the API.
-
getNearestCity(
double? lat, double? lng, {int maxDistance = 80467}) → Future< TffCity> - Retrieves information about the nearest supported city from the API.
-
getTaxiCompanies(
String? city) → Future< List< TffTaxiCompany> > - Retrieves a list of taxi companies in the given city (entity).
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited