webart 0.2.0-alpha.6

  • README.md
  • Installing
  • Versions
  • 57


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

Use this package as a library

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 flutter 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


We analyzed this package on Jun 12, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.60.0
  • pana: 0.11.3


Describes how popular the package is relative to other packages. [more]
27 / 100
Code health derived from static analysis. [more]
83 / 100
Reflects how tidy and up-to-date the package is. [more]
96 / 100
Overall score:
Weighted score of the above. [more]
Learn more about scoring.


Detected platforms: Flutter, other

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


  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 4 errors 19 hints.

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

    line: 119 col: 32
    The function expression type '(Layer) → Future<dynamic>' isn't of type '(dynamic) → Future<dynamic>'. This means its parameter or return type does not match what is expected. Consider changing parameter type(s) or the returned type(s).

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

    line: 60 col: 22
    The argument type '(List<dynamic>) → Null' can't be assigned to the parameter type '(dynamic) → void'.

    Similar analysis of the following files failed:

    • lib/src/web.dart (error)
    • lib/src/config.dart (hint)
    • lib/src/context.dart (hint)
    • lib/src/handler.dart (hint)
    • lib/src/logging.dart (hint)
    • lib/src/plugin.dart (hint)
    • lib/src/request.dart (hint)
    • lib/web.dart (hint)
    • lib/webart.dart (hint)
  • 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.3+1
uri_template ^0.6.0 0.6.0
yaml ^2.1.12 2.1.14
Transitive dependencies
analyzer 0.27.6 0.32.1
args 0.13.7 1.4.3
async 2.0.7
charcode 1.1.1
collection 1.14.10
convert 2.0.1
crypto 2.0.3
csslib 0.14.4
glob 1.1.5
html 0.13.3+1
http_parser 3.1.2
intl 0.12.7+1 0.15.6
isolate 0.2.3 2.0.1
matcher 0.12.2+1
meta 1.1.5
package_config 1.0.3
path 1.6.0
petitparser 1.7.6
plugin 0.2.0+2
quiver 0.29.0+1
source_span 1.4.0
stack_trace 1.9.2
stream_channel 1.6.7
string_scanner 1.0.2
typed_data 1.1.5
utf 0.9.0+4
watcher 0.9.7+8
Dev dependencies
test ^0.12.30