Skip to content
pubscout

darto

1.3.0, released 4 months ago by evandersondev.com.br

Minimal and type-safe web framework for Dart inspired by Express and Hono.

$ flutter pub add darto
Source repository

What it does

Darto is a microframework for building web applications and APIs in Dart. It handles routing, middleware pipelines, requests, responses, context management, and server listening.

AI-written summary of version 1.3.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You want to build lightweight web servers or REST APIs in Dart.
  • You prefer an Express- or Hono-style API for handling routes and middleware.

Skip it when

  • You are building a client-side Flutter application.
  • You need HTTP/2 support since Darto serves over HTTP/1.1 only.

Strengths

  • Familiar Express/Hono-inspired routing and context API.
  • Includes features like content negotiation, routing groups, and middleware support.
  • Fast literal route matching performance.

Weaknesses

  • Limited to HTTP/1.1 protocol support.
  • Not intended for client-side use.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
2

Not documented

import 'package:darto/darto.dart';

void main() {
  final app = Darto();

  app.get('/users/:id', [], (Context c) {
    final id = c.req.param('id');

    return c.ok({'id': id});
  });

  app.listen(3000);
}

Alternatives

Packages that do the same job and could replace darto.

  • shelf_router

    Alternative routing package for Dart backend applications using the Shelf ecosystem.

Works with

Packages commonly used together with darto: ones it builds on, ones built on it, and its own family.