dkit 0.0.4

  • Readme
  • Changelog
  • Installing
  • 41

Dart Toolkit.

0.0.1 - 2020-02-16
  • 添加控制反转容器组件(Container)
  • 添加事件监听器组件(Listener)
  • 添加Http组件,包括路由(Router)、HTTP服务(Server)、HTTP上下文(Context)、控制器接口(Controller)
  • 添加日志组件(Logger)
  • 添加内核组件(Kernel)
0.0.1+1 - 2020-02-17
  • 移除全局路由动作
0.0.1+2 - 2020-020-17
  • 修改HTTP响应
0.0.3 - 2020-02-18
  • 框架架构优化调整
0.0.4 - 2020-020-18
  • 框架架构优化调整

Use this package as a library

1. Depend on it

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

  dkit: ^0.0.4

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

We analyzed this package on Mar 26, 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

Fix bin/main.dart. (-1 points)

Analysis of bin/main.dart reported 2 hints:

line 1 col 8: Unused import: 'dart:io'.

line 4 col 8: Unused import: 'package:dkit/src/facade/router.dart'.

Fix lib/src/kernel/dispatcher.dart. (-0.50 points)

Analysis of lib/src/kernel/dispatcher.dart reported 1 hint:

line 7 col 19: The value of the field '_context' isn't used.

Fix lib/src/kernel/logger.dart. (-0.50 points)

Analysis of lib/src/kernel/logger.dart reported 1 hint:

line 13 col 15: The value of the field '_maxSize' isn't used.

Fix additional 20 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/dkit.dart (Run dartfmt to format lib/dkit.dart.)
  • lib/src/facade/router.dart (Run dartfmt to format lib/src/facade/router.dart.)
  • lib/src/kernel.dart (Run dartfmt to format lib/src/kernel.dart.)
  • lib/src/kernel/container.dart (Run dartfmt to format lib/src/kernel/container.dart.)
  • lib/src/kernel/context.dart (Run dartfmt to format lib/src/kernel/context.dart.)
  • lib/src/kernel/error.dart (Run dartfmt to format lib/src/kernel/error.dart.)
  • lib/src/kernel/listener.dart (Run dartfmt to format lib/src/kernel/listener.dart.)
  • lib/src/kernel/middleware.dart (Run dartfmt to format lib/src/kernel/middleware.dart.)
  • lib/src/kernel/pipeline.dart (Run dartfmt to format lib/src/kernel/pipeline.dart.)
  • lib/src/kernel/router.dart (Run dartfmt to format lib/src/kernel/router.dart.)
  • lib/src/kernel/server.dart (Run dartfmt to format lib/src/kernel/server.dart.)
  • lib/src/middleware/req/access_log.dart (Run dartfmt to format lib/src/middleware/req/access_log.dart.)
  • lib/src/middleware/req/body_limit.dart (Run dartfmt to format lib/src/middleware/req/body_limit.dart.)
  • lib/src/middleware/req/cors.dart (Run dartfmt to format lib/src/middleware/req/cors.dart.)
  • lib/src/middleware/req/csrf.dart (Run dartfmt to format lib/src/middleware/req/csrf.dart.)
  • lib/src/middleware/req/rate_limit.dart (Run dartfmt to format lib/src/middleware/req/rate_limit.dart.)
  • lib/src/middleware/req/timeout.dart (Run dartfmt to format lib/src/middleware/req/timeout.dart.)
  • lib/src/middleware/srv/other.dart (Run dartfmt to format lib/src/middleware/srv/other.dart.)
  • lib/src/provider/logger.dart (Run dartfmt to format lib/src/provider/logger.dart.)
  • lib/src/provider/router.dart (Run dartfmt to format lib/src/provider/router.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 dkit.dart. Packages with multiple examples should provide example/

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.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
Dev dependencies
pedantic ^1.8.0
test ^1.6.0