cuba_weather_dart 1.1.3 copy "cuba_weather_dart: ^1.1.3" to clipboard
cuba_weather_dart: ^1.1.3 copied to clipboard

outdated

Dart client for www.redcuba.cu weather API. Given a location in Cuba, if it is within the permitted locations, meteorological data on the location is obtained.

example/example.dart

import 'dart:io';

import 'package:cuba_weather_dart/cuba_weather_dart.dart';

void main() {
  print('Insert location:');
  var location = stdin.readLineSync();
  var cubaWeather = CubaWeather();
  cubaWeather.getWeather(location).then((weather) {
    print('City Name: ${weather.cityName}');
    print('Temperature: ${weather.temp}°C');
    print('Timestamp: ${weather.dt.date}');
    print('Humidity: ${weather.humidity}%');
    print('Pressure: ${weather.pressure} hpa');
    print('Wind: ${weather.windstring}');
    print('Description: ${weather.descriptionWeather}');
    print('Image Link: ${weather.iconWeather}');
  });
}
3
likes
0
pub points
14%
popularity

Publisher

unverified uploader

Dart client for www.redcuba.cu weather API. Given a location in Cuba, if it is within the permitted locations, meteorological data on the location is obtained.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

edit_distance, equatable, http, test

More

Packages that depend on cuba_weather_dart