angel_framework 1.1.1

  • Example
  • Installing
  • Versions
  • 39


Pub build status

A high-powered HTTP server with support for dependency injection, sophisticated routing and more.

This is the core of the Angel framework. To build real-world applications, please see the homepage.

import 'package:angel_framework/angel_framework.dart';

main() async {
  var app = new Angel();

    ..get('/hello', (req, res) {
    })'/date', () => new;

  var http = new AngelHttp(app);
  var server = await app.startServer('', 3000);
  print('Listening at http://${server.address.address}:${server.port}');


  • ResponseContext no longer automatically closes if serializer returns an empty string.
  • Added autoSnakeCaseNames to MapService.
  • Deprecated Angel.createZoneForRequest.
  • Deprecated all Angel methods that directly touch an HttpServer or HttpRequest.
  • Created the AngelHttp class.
  • Removed explicit dependence on dart:io for Angel, RequestContext, ResponseContext.
  • Created lib/http.dart, which exports HTTP-specific functionality.
  • AnonymousService now takes FutureOr.
  • Service.toId no longer only takes a String, and is generically-typed.


  • Modified ResponseContext#isOpen to also return false if streaming is being used.


  • Modified handleAngelHttpException to only run rescue code if the response is still open. Prevents application crashes.


  • Modified _matchesId in MapService to support custom ID fields.


  • The default errorHandler now only sends HTML if the user explicitly accepts it.


  • Fixed a bug that prevented isProduction from ever returning true.
    • This enabled caching, which greatly improved performance.
  • Requests no longer have independent zones, which greatly improved performance.
  • FormatException, when caught, is automatically transformed in a 400 error response.
  • Added extension to RequestContext.
  • Added strict to RequestContext#accepts.
  • Added a toString override for the Providers class.
  • Returned to RegExp for stripping stray slashes.
  • The request path is now only parsed once.
  • Optimized the parsing of the ACCEPT_ENCODING header.


  • Added an autoIdAndDateFields flag to MapService. Finally.


  • Made handlerCache public.
  • Added AngelMetrics.


  • Added @Parameter() annotations, with support for pattern matching.


  • Closed #166, killing any hanging Stopwatch instances when streaming.
  • Removed AngelPlugin and AngelMiddleware, as well as the @proxy annotations from Angel and RequestContext.
  • Officially deprecated properties in Angel.
  • Fixed a bug where cached routes would not heed the request method. #173
  • Reworked error handling logic; now, errors will not automatically default to sending JSON.
  • Removed the onController stream from Angel.
  • Controllers now longer use call, which has now been renamed to configureServer.


  • Made injections in RequestContext private.
  • Renamed properties in AngelBase to configuration.


  • Fixed a bug where encoders would cause a malformed response to be sent.
  • Fixed a bug where encoders would not always use the correct encoder.


  • Removed AngelFatalError, and subsequently fatalErrorStream.
  • Removed all @deprecated members.
  • Removed @Hooked, beforeProcessed, and afterProcessed.


import 'package:angel_framework/angel_framework.dart';

main() async {
  var app = new Angel();

  app.get('/', () => 'Welcome to Angel!');

  app.get('/greet/:name', (String name) => 'Hello, $name!');

  app.use((RequestContext req) async {
    throw new AngelHttpException.notFound(
      message: 'Unknown path: "${req.uri.path}"',

  var http = new AngelHttp(app);
  var server = await http.startServer('', 3000);
  print('Listening at http://${server.address.address}:${server.port}');

Use this package as a library

1. Depend on it

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

  angel_framework: ^1.1.1

2. Install it

You can install packages from the command line:

with pub:

$ pub get

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

3. Import it

Now in your Dart code, you can use:

import 'package:angel_framework/angel_framework.dart';
Version Uploaded Documentation Archive
1.1.5+1 Aug 4, 2018 Go to the documentation of angel_framework 1.1.5+1 Download angel_framework 1.1.5+1 archive
1.1.5 Jul 12, 2018 Go to the documentation of angel_framework 1.1.5 Download angel_framework 1.1.5 archive
1.1.4+11 Jul 9, 2018 Go to the documentation of angel_framework 1.1.4+11 Download angel_framework 1.1.4+11 archive
1.1.4+10 Jul 9, 2018 Go to the documentation of angel_framework 1.1.4+10 Download angel_framework 1.1.4+10 archive
1.1.4+9 Jul 9, 2018 Go to the documentation of angel_framework 1.1.4+9 Download angel_framework 1.1.4+9 archive
1.1.4+7 Jun 27, 2018 Go to the documentation of angel_framework 1.1.4+7 Download angel_framework 1.1.4+7 archive
1.1.4+6 Jun 23, 2018 Go to the documentation of angel_framework 1.1.4+6 Download angel_framework 1.1.4+6 archive
1.1.4+5 Jun 23, 2018 Go to the documentation of angel_framework 1.1.4+5 Download angel_framework 1.1.4+5 archive
1.1.4+4 Jun 20, 2018 Go to the documentation of angel_framework 1.1.4+4 Download angel_framework 1.1.4+4 archive
1.1.4+3 Jun 10, 2018 Go to the documentation of angel_framework 1.1.4+3 Download angel_framework 1.1.4+3 archive

All 166 versions...

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.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see

Maintenance issues and suggestions

Running dartdoc failed. (-10 points)

Make sure dartdoc runs without any issues.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.19.0 <2.0.0