cuba_weather_dart 1.3.2

  • Readme
  • Changelog
  • Example
  • Installing
  • new72

Cuba Weather #

License: MIT Pub Version GitHub Workflow Status

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

  • To see how to install the package, follow this link.

  • To see examples of use, follow this link.

  • To see the package page on pub.dev, follow this link.

  • To see the changelog, follow this link.

Cuba Weather Changelog #

[1.3.2] - January 16, 2020

  • Remove the tests, because the test package creates conflict with flutter_test.

[1.3.1] - January 15, 2020

  • Use Datetime class for date
  • Fix error in double conversion

[1.3.0] - January 15, 2020

  • Remove locations duplicates
  • Use double type instance of int type

[1.2.1] - January 12, 2020

  • Implement Damerau Levenshtein distance without extra dependency
  • Remove unnecessary dependencies

[1.2.0] - January 12, 2020

  • Restructure code
  • Optional suggestion
  • Correct handling exceptions
  • Improve README.md

[1.1.5] - January 11, 2020

  • Fix error in GitHub Actions

[1.1.4] - January 10, 2020

  • Implement actions for master and develop branchs

[1.1.3] - January 10, 2020

  • Autopublish in pub.dev with GitHub Actions

[1.1.2] - January 10, 2020

  • Fix errors in dependencies

[1.1.1] - January 10, 2020

  • Fix variable names
  • Fix errors in dependencies

[1.1.0] - January 10, 2020

  • Find location with Levenshtein distance
  • Improve example

[1.0.0] - January 10, 2020

  • Create GitHub workflow
  • Add README license badge
  • Add README package version badge
  • Add README build result badge
  • Document code

[0.1.4] - January 10, 2020

  • Fix error in wind property
  • Fix error in location sort
  • Improve example
  • Improve test

[0.1.3] - January 9, 2020

  • Remove unnecessary code
  • Add CODE_OF_CONDUCT.md
  • Improve README.md

[0.1.2] - January 9, 2020

  • Fix example README.md

[0.1.1] - January 9, 2020

  • Remove Flutter dependency
  • Use Test Dart package instance of Flutter Test
  • Add pubspec.yaml to example
  • Fix example
  • Fix test

[0.1.0] - January 9, 2020

  • Improve package description
  • Format code
  • Add example
  • Change homepage

[0.0.1] - January 9, 2020

  • Initial implementation of Dart client for www.redcuba.cu weather API.

example/README.md

Cuba Weather Examples #

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

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.get(location, suggestion: true).then((weather) {
    print(weather);
  });
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  cuba_weather_dart: ^1.3.2

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:cuba_weather_dart/cuba_weather_dart.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
45
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
72
Learn more about scoring.

We analyzed this package on Jan 19, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4

Health suggestions

Fix lib/src/utils/damerau_levenshtein.dart. (-1 points)

Analysis of lib/src/utils/damerau_levenshtein.dart reported 2 hints:

line 22 col 11: Unnecessary new keyword.

line 23 col 19: Unnecessary new keyword.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.2.0 <3.0.0
http ^0.12.0 0.12.0+4
Transitive dependencies
async 2.4.0
charcode 1.1.2
collection 1.14.12
http_parser 3.1.3
meta 1.1.8
path 1.6.4
pedantic 1.9.0
source_span 1.6.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6