correios_frete 0.0.1

correios_frete #

Build Status License: MIT Codemagic build status

Calcular o Preço e o Prazo da Entregas de encomendas. Este pacote utilizar API http e xml2json

Usage #


dependencies:
     flutter:
        sdk: flutter
     correios_frete:

Como calcular o valor do frete com Preço e Prazo #


  // import 'package:correios_frete/correios_frete.dart';

  Result resultado = await CalcPriceTerm("0","0","04014","69097374","13480010","1","1","20","20","20",
      "0","N","N","N","xml","3");

    print("Valor do frete: ${resultado.valor}");
    print("Prazo de Entrega: ${resultado.prazo}");
    print("Valor da Mão Própria: ${resultado.vmp}");
    print("Valor do Aviso de Recebimento: ${resultado.valor}");
    print("Valor do Valor Declarado: ${resultado.vvd}");
    print("Possui Entrega Domiciliar (S - Sim , N - Não): ${resultado.entrDom}");
    print("Possui Entrega ao Sábados (S - Sim , N - Não): ${resultado.entrSa}");
    print("Valor sem Adicionais: ${resultado.vsa}");

Documentação #

Para obter ajuda sobre como funcionar o processo, consulte a documentação

[0.0.1] - 2020-01-24.

  • Initial Release: Implementation of the CalcPriceTerm and CalcTerm methods

Use this package as a library

1. Depend on it

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


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

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

  • Dart: 2.7.1
  • pana: 0.13.5

Health issues and suggestions

Document public APIs. (-1 points)

18 out of 18 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Fix lib/correios_frete.dart. (-1.99 points)

Analysis of lib/correios_frete.dart reported 4 hints:

line 7 col 16: This function has a return type of 'Future

line 25 col 23: Unnecessary new keyword.

line 93 col 16: This function has a return type of 'Future

line 100 col 23: Unnecessary new keyword.

Maintenance suggestions

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and correios_frete.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
http ^0.12.0+2 0.12.0+4
xml2json ^4.1.1 4.1.1
Transitive dependencies
async 2.4.0
charcode 1.1.3
collection 1.14.12
convert 2.1.1
http_parser 3.1.3
meta 1.1.8
path 1.6.4
pedantic 1.9.0
petitparser 3.0.0
source_span 1.6.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
xml 3.7.0