cuba_weather_redcuba_dart 2.3.1

  • Readme
  • Changelog
  • Example
  • Installing
  • 64

Cuba Weather Red Cuba Dart #

License: MIT Pub Version GitHub Workflow Status

Application programming interface of the Cuba Weather project for www.redcuba.cu implemented in Dart.

  • 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 Red Cuba Dart Changelog #

[2.3.1] - February 4, 2020 #

  • Some fixes

[2.3.0] - February 4, 2020 #

  • Add radians and degree of wind

[2.2.0] - February 4, 2020 #

  • Add all directions of wind

[2.1.0] - January 27, 2020 #

  • Implement enum for wind direction
  • Implement parse for wind velocity

[2.0.3] - January 26, 2020 #

  • Update dependencies

[2.0.2] - January 25, 2020 #

  • Remove source duplicate

[2.0.1] - January 25, 2020 #

  • Update cuba_weather_municipality_dart package to v0.1.2
  • Fix description of package

[2.0.0] - January 25, 2020 #

  • Rename the package from cuba_weather_dart to cuba_weather_redcuba_dart
  • Added all the municipalities of Cuba
  • New algorithm to search the weather information of a municipality

[1.3.3] - January 21, 2020 #

  • Add new locations
  • Implement health suggestions

[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/example.dart

import 'dart:io';

import 'package:cuba_weather_redcuba_dart/cuba_weather_redcuba_dart.dart';

void main() {
  print('Insert municipality:');
  var input = stdin.readLineSync();
  var cubaWeatherRedCuba = CubaWeatherRedCuba();
  cubaWeatherRedCuba.get(input).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_redcuba_dart: ^2.3.1

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_redcuba_dart/cuba_weather_redcuba_dart.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
36
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
80
Overall:
Weighted score of the above. [more]
64
Learn more about scoring.

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

  • Dart: 2.7.1
  • pana: 0.13.6

Health suggestions

Format lib/src/models/weather_model.dart.

Run dartfmt to format lib/src/models/weather_model.dart.

Maintenance issues and suggestions

Homepage URL doesn't exist. (-20 points)

At the time of the analysis the homepage field https://github.com/cuba-weather/cuba-weather-redcuba-dart was unreachable.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.2.0 <3.0.0
cuba_weather_municipality_dart ^0.1.3 0.1.3
http ^0.12.0 0.12.0+4
Transitive dependencies
async 2.4.1
charcode 1.1.3
collection 1.14.12
http_parser 3.1.4
meta 1.1.8
path 1.6.4
pedantic 1.9.0
source_span 1.7.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6