目录

Contents

命令行和服务器的库和 Package

Dart SDK 包含 dart:io 和其它提供底层命令行和服务器 API 的库。

The Dart SDK contains dart:io and other libraries that provide low-level command-line & server APIs.

SDK 库

SDK libraries

Dart SDK 包含 dart:io 和其它提供底层 web API 的库。

The Dart SDK contains dart:io and other libraries that provide low-level web APIs.

库概览的 dart:io 小节
一个使用 dart:io 库的示例驱动概览。主要包括如何使用文件和目录以及发起和处理 HTTP 请求。

The dart:io section of the library tour
An example-driven tour of using the dart:io library. Topics include working with files & directories, and making & handling HTTP requests.

dart:io API 参考
完整的 dart:io 库参考文档。

dart:io API reference
Complete reference documentation for the dart:io library.

社区上的一些第三方 package

Community packages

pub.dev 网站 暂时还不支持仅搜索命令行和服务器应用相关的 package。但是你可以搜索描述所需功能的单词。

The pub.dev site doesn’t currently support limiting your search to packages that support command-line and server apps. You can, however, search for words that describe the functionality you need.

命令行相关的 package

Command-line packages

命令行应用常常使用下述列表中列出的 package,除此之外还有像 archiveintlyaml 这样的 通用 package

Command-line apps often use the following packages, in addition to general-purpose packages such as archive, intl, and yaml:

Package Description
包名 描述
args Parses raw command-line arguments into a set of options and values.
args 将原始命令行参数解析为一组选项和值。
cli_util Provides utilities for building command-line apps.
cli_util 提供用于构建命令行应用程序的工具。
completion Adds command-line completion to apps that use the args package.
completion 向使用 args 包的应用中添加命令行完成功能。
path Provides comprehensive, cross-platform operations for manipulating paths.
path 为操作路径提供全面的跨平台操作。
usage Wraps Google Analytics.
usage 添加 Google 分析。

服务器相关的 package

Server packages

服务器应用可选择使用的 package 更多一些,除了上面上面表格中列出的外还支持比如 logging 这样的 通用 package

Server apps can choose from many packages, in addition to the packages listed in the previous table and general-purpose packages such as logging:

Package Description
包名 描述
appengine Provides support for running server applications written in Dart on Google App Engine using Custom Runtimes with Flex Environment.
appengine 为在 Google App Engine 上使用 Flex Environment 自定义运行时 的 Dart 应用提供支持。
aqueduct Supports building scalable REST APIs that run on the Dart VM.
aqueduct 支持构建运行在 Dart VM 上可伸缩的 REST API。
angel_framework A high-powered HTTP server with support for dependency injection & sophisticated routing.
angel_framework 支持依赖注入和复杂路由的高性能 HTTP 服务器。
crypto Implements cryptographic hashing functions for algorithms such as SHA-1, SHA-256, MD5, and HMAC.
crypto 为 SHA-1、SHA-256、MD5 和 HMAC 等算法实现加密哈希散列函数。
grpc Implements gRPC, a high performance, open source, general RPC framework that puts mobile and HTTP/2 first.
grpc 实现 [gRPC][],将移动和 HTTP/2 放在首位的高性能开源通用的 RPC 框架。
http_multi_server Extends the dart:io HttpServer class with support for multiple servers.
http_multi_server 继承自 dart:io HttpServer 类并支持多服务器。
http_server Provides utility classes that work with HttpServer to serve web content.
http_server 提供与 HttpServer 相关的工具类以提供网页内容。
shelf Provides a model for web server middleware that encourages composition and easy reuse.
shelf 为 Web 服务器中间件提供一个模型,该模型促成组合和易于重用。