webart 0.2.0-alpha.6

  • README.md
  • Installing
  • Versions
  • new55


A lightweight web framework for Dart.


This library is unstable now, it doesn't has any test. Any discussion welcome!


  • Web server (Thanks shelf)
  • Plugin support
  • Router
  • Context support


This example show the basic usage of web.dart

    git: https://gitlab.com/thislight/web.dart.git


  webart: any


import "package:webart/web.dart";

    // Create app
    Application app = new Application(
        new Config(<String, dynamic>{
                "": helloWorldHandler,

    // Start app
    app.start("", 8088).then((_){
        print("Server started");

// Define handler
Future helloWorldHandler(Request request) async{
    request.res.ok("Hello World");


Now api documents aren't finished. But you can get a overview of this library.

Documents will be build when new changes pushing or everyday(4:00 UTC+8).

The document of branch master

The document of branch develop


Copyright 2017 thisLight

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at


Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.



  • Remove LoggingLayer
  • Request.on changes to async


  • return not found when not handler found


  • Fix error that handler will be called twice


  • Fix error that handler not handled


  • Add EventBus for plugin
  • Redesign route system, allow using third party router
  • Redesign layer system, get Go away and make it powerful
  • A bit tests for EventBus


  • Fix performance problem while running handler, move waitForResponse to trash


  • First version

1. Depend on it

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

  webart: "^0.2.0-alpha.6"

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

Alternatively, your editor might support pub get or packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:webart/webart.dart';
Version Uploaded Documentation Archive
0.2.0-alpha.6 Feb 18, 2018 Go to the documentation of webart 0.2.0-alpha.6 Download webart 0.2.0-alpha.6 archive
0.2.0-alpha.5 Feb 5, 2018 Go to the documentation of webart 0.2.0-alpha.5 Download webart 0.2.0-alpha.5 archive
0.2.0-alpha.4 Feb 5, 2018 Go to the documentation of webart 0.2.0-alpha.4 Download webart 0.2.0-alpha.4 archive
0.2.0-alpha.3 Feb 5, 2018 Go to the documentation of webart 0.2.0-alpha.3 Download webart 0.2.0-alpha.3 archive
0.2.0-alpha.2 Feb 5, 2018 Go to the documentation of webart 0.2.0-alpha.2 Download webart 0.2.0-alpha.2 archive


This feature is new.
We welcome feedback.
More details: scoring.

We analyzed this package, and provided a score, details, and suggestions below.

  • tool failures on Feb 18, 2018
  • Dart: 2.0.0-dev.20.0
  • pana: 0.10.1


Describes how popular the package is relative to other packages. [more]
21 / 100
Code health derived from static analysis. [more]
89 / 100
Reflects how tidy and up-to-date the package is. [more]
88 / 100
Overall score:
Weighted score of the above. [more]


Detected platforms: Flutter, other

Primary library: package:webart/webart.dart with components: io.


  • Fix lib/src/route.dart.

    Strong-mode analysis of lib/src/route.dart failed with the following error:

    line: 69 col: 5
    Invalid override. The type of 'Router.addSpec' ('(RouteSpec) → void') isn't a subtype of 'BaseRouter.addSpec' ('(BaseRouteSpec) → void').

  • Fix lib/src/web.dart.

    Strong-mode analysis of lib/src/web.dart failed with the following error:

    line: 62 col: 18
    A value of type '(Request) → FutureOr<Response>' can't be assigned to a variable of type 'Pipeline'.

  • Fix issues reported by dartanalyzer.

    dartanalyzer reported 2 error(s) and 0 warning(s).

  • Package is pre-release.

    Pre-release versions should be used with caution, their API may change in breaking ways.

  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Maintain an example.

    None of the files in your example/ directory matches a known example patterns. Common file name patterns include: main.dart, example.dart or you could also use webart.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.8.0 <2.0.0
bwu_log ^0.1.2 0.1.2 2.0.0-alpha.2
logging ^0.11.3 0.11.3+1
shelf ^0.7.1 0.7.2
uri_template ^0.6.0 0.6.0
yaml ^2.1.12 2.1.13
Transitive dependencies
analyzer 0.27.6 0.31.1
args 0.13.7 1.3.0
async 2.0.3 2.0.4
charcode 1.1.1
collection 1.14.5
convert 2.0.1
crypto 2.0.2+1
csslib 0.14.1
glob 1.1.5
html 0.13.2+2
http_parser 3.1.1
intl 0.12.7+1 0.15.2
isolate 0.2.3 1.1.0
matcher 0.12.1+4
meta 1.1.2
package_config 1.0.3
path 1.5.1
petitparser 1.7.0
plugin 0.2.0+2
quiver 0.28.0
source_span 1.4.0
stack_trace 1.9.2
stream_channel 1.6.3
string_scanner 1.0.2
typed_data 1.1.5
utf 0.9.0+4
watcher 0.9.7+7
Dev dependencies
test ^0.12.30