AirportInfo
Library for retrieving data from the Airport Info API by Active API available via the RapidAPI service.
Features
- Gets airport information in an easy to use format.
Getting Started
- Get an API key from the Airport Info API page.
Usage
import 'package:airportinfo/airportinfo.dart';
var key = ApiKey("<host>", "<API key>");
try {
var airport = await AirportInfo.fetch(key, RequestType, "<airport code>");
if (airport != null) {
// Do whatever is needed with the data.
} else {
// Handle
}
} on InvalidCodeException {
print('Code length is invalid.');
}
RequestType
can be either:
RequestType.iata
for three letter codes provided by the International Air Transport Association.RequestType.icao
for four letter codes provided by the International Civil Aviation Organization.
Issues
Issues can be submitted to the GitHub repository.
Libraries
- airportinfo
- Library for retrieving airport information from an API.