fake_http 0.0.1+4

fake_http #

GitHub tag pub package

flutter版okhttp3

fake 系列 libraries #

  1. flutter版okhttp3
  2. flutter版微信SDK
  3. flutter版腾讯(QQ)SDK
  4. flutter版新浪微博SDK
  5. flutter版支付宝SDK

dart/flutter 私服 #

simple_pub_server

OkHttpClient #

还是原来的配方,还是熟悉的味道

flutter #

snapshot #

dependencies:
  fake_http:
    git:
      url: https://github.com/v7lin/fake_http.git

release #

latestVersion = 0.0.1+3
dependencies:
  fake_http: ^${latestVersion}

example #

示例

Getting Started #

This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

[0.0.1] - 2018.9.30

  • 实现flutter版okhttp3

Use this package as a library

1. Depend on it

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


dependencies:
  fake_http: ^0.0.1+4

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support 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:fake_http/fake_http.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
54
Health:
Code health derived from static analysis. [more]
69
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
60
Overall:
Weighted score of the above. [more]
60
Learn more about scoring.

We analyzed this package on Sep 17, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.0
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.2

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health issues and suggestions

Fix lib/okhttp3/widget/okhttp_network_image.dart. (-25.38 points)

Analysis of lib/okhttp3/widget/okhttp_network_image.dart failed with 1 error, 1 hint:

line 44 col 9: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable

line 44 col 31: This function has a return type of 'Iterable

Document public APIs. (-0.27 points)

505 out of 518 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/okhttp3/multipart_body.dart. (-2.48 points)

Analysis of lib/okhttp3/multipart_body.dart reported 5 hints:

line 21 col 26: Name non-constant identifiers using lowerCamelCase.

line 22 col 26: Name non-constant identifiers using lowerCamelCase.

line 23 col 26: Name non-constant identifiers using lowerCamelCase.

line 24 col 26: Name non-constant identifiers using lowerCamelCase.

line 25 col 26: Name non-constant identifiers using lowerCamelCase.

Fix lib/okhttp3/media_type.dart. (-1.99 points)

Analysis of lib/okhttp3/media_type.dart reported 4 hints:

line 20 col 26: Name non-constant identifiers using lowerCamelCase.

line 21 col 26: Name non-constant identifiers using lowerCamelCase.

line 22 col 26: Name non-constant identifiers using lowerCamelCase.

line 23 col 26: Name non-constant identifiers using lowerCamelCase.

Fix additional 7 files with analysis or formatting issues. (-3 points)

Additional issues in the following files:

  • lib/okhttp3/cache_control.dart (2 hints)
  • lib/okhttp3/internal/util.dart (2 hints)
  • lib/okhttp3/cache.dart (1 hint)
  • lib/okhttp3/tools/persistent_cookie_jar.dart (1 hint)
  • lib/okhttp3/response_body.dart (Run flutter format to format lib/okhttp3/response_body.dart.)
  • lib/okhttp3/tools/optimized_request_interceptor.dart (Run flutter format to format lib/okhttp3/tools/optimized_request_interceptor.dart.)
  • lib/okhttp3/tools/progress_request_interceptor.dart (Run flutter format to format lib/okhttp3/tools/progress_request_interceptor.dart.)

Maintenance suggestions

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

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 fake_http.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.0.0-dev.68.0 <3.0.0
charcode ^1.1.2 1.1.2
convert ^2.0.2 2.1.1
crypto ^2.0.6 2.1.3
file ^5.0.6 5.0.10
flutter 0.0.0
quiver ^2.0.0+1 2.0.5
Transitive dependencies
collection 1.14.11 1.14.12
intl 0.16.0
matcher 0.12.5
meta 1.1.7
path 1.6.4
sky_engine 0.0.99
stack_trace 1.9.3
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test
pedantic >=1.4.0 <3.0.0