ion 0.5.1


Ion is a Dart-based HTTP framework with native multipart/form-data and WebSocket support highly influenced by Express framework. The main goal of this framework is to easily and quickly make a server without writing a lot of code.

Todos #

It's still in alpha, so there is still some work to do:

  • multipart/form-data will be rewritten to be capable of fetching unlimited data (it's limited up to around 50 MB now),
  • RESTful API will be supported
  • HTTPS Certificates will be supported
  • WebSocket engine will be reconstructed
  • Renderer engine will be rewritten

Installation #


Tutorial #


0.4.2 #

  • Initial version

0.4.3 #

  • Cleaned up a project

0.4.4 #

  • Made the example


import "package:ion/ion.dart";
import "dart:io";

void main() {
  //pass a port
  var app = Ion(80);

  app.get("/", (req, res) {
    res.send("Welcome on my page!");

  app.get("/contact", (req, res) {
    var f = File("./static/contact.html");



Use this package as a library

1. Depend on it

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

  ion: ^0.5.1

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

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

3. Import it

Now in your Dart code, you can use:

import 'package:ion/ion.dart';
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.

We analyzed this package on Sep 10, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.0
  • pana: 0.12.21


Detected platforms: Flutter, other

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

Health issues and suggestions

Fix lib/src/ion_req.dart. (-25 points)

Analysis of lib/src/ion_req.dart failed with 1 error:

line 24 col 30: The argument type 'Utf8Decoder' can't be assigned to the parameter type 'StreamTransformer<Uint8List, dynamic>'.

Document public APIs. (-1 points)

22 out of 22 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Fix lib/ion.dart. (-1.99 points)

Analysis of lib/ion.dart reported 4 hints:

line 30 col 19: Don't type annotate initializing formals.

line 30 col 33: Don't type annotate initializing formals.

line 66 col 7: Future results in async function bodies must be awaited or marked unawaited using package:pedantic.

line 72 col 31: This function has a return type of 'bool', but doesn't end with a return statement.

Fix lib/src/ion_res.dart. (-1 points)

Analysis of lib/src/ion_res.dart reported 2 hints:

line 8 col 23: Use ; instead of {} for empty constructor bodies.

line 38 col 5: Dead code.

Format lib/src/ion_renderer.dart.

Run dartfmt to format lib/src/ion_renderer.dart.

Format lib/src/ion_sock.dart.

Run dartfmt to format lib/src/ion_sock.dart.


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