formler 1.0.0

Build Status

formler #

[![Join the chat at](](

Simple form data parser.


Getting Started #

Pubspec # (you can use 'any' instead of a version if you just want the latest always)

  formler: 1.0.0
import 'package:formler/formler.dart';

Start parsing ...

// Parse a Multipart form
Formler formler = new Formler(bytes, "--someBoundaryStuff");
Map form = formler.parse(); // -> {fieldName: .... }

// Parse a UrlEncoded form
Formler.parseUrlEncoded("username=someValue+other%26val&password=eqwdawd9"); // -> { "username": "someValue other&val", "password": "eqwdawd9" }


new Formler(List

Creates a new Formler instance with the byte contents of the request and the boundary from the contentType.

  • bytes - (List

Returns the new instance of Formler.

formler.parse() #

Actually does the parsing of the data and creates the data map of the contents.

Returns Map representation of the parsed data.

(static) Formler.parseUrlEncoded(String postBody, [bool printErrors = true])

Parses a UrlEncoded post body string.

  • postBody - (String) A string of key/urlencoded value pairs.
  • printErrors - (Bool) Set to false if you don't want Formler to print warnings to STDOUT. Default is true.

Returns Map representation of the parsed Data

Example: Encode a hex string.

Testing #

In dartvm

dart test\formler_test.dart

In Browser

At the moment, this package does not work client-side as it uses server-side only UInt8Lists. I might have to wait till UInt8Arrays and UInt8Lists are merged into 1

Release notes #


  • Pull Request accepted to fix package versions for increased compatibility.


  • Fix empty string and handle malformed urlencoded strings gracefully.


  • Dart 1.0 Readiness


  • Fixing analyzer complaints.


  • Fixing package changes for Crypto and URI


  • Including fixes for TypedData and Regex and also switched to useing the Base64 Decode built into Crypto now.


  • Accepted pull request to add multi-file support. Must have overlooked this in my excitement to get this parser working.


  • Fixing an import/part issue that affected Fukiya.


  • Binary file upload parsing bug fixed.


  • Parsing Bugs.


  • Initial Release

Use this package as a library

1. Depend on it

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

  formler: ^1.0.0

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:formler/formler.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 Jan 27, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.4

Health issues and suggestions

Document public APIs. (-1 points)

29 out of 29 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/formler.dart. (-6.78 points)

Analysis of lib/formler.dart reported 14 hints, including:

line 7 col 7: Unnecessary new keyword.

line 8 col 32: Unnecessary new keyword.

line 10 col 28: Unnecessary new keyword.

line 12 col 7: Unnecessary new keyword.

line 54 col 9: Use isEmpty instead of length

Maintenance issues and suggestions

Provide a file named (-20 points)

Changelog entries help developers follow the progress of your package. See the example generated by stagehand.

Package is getting outdated. (-40.27 points)

The package was last published 73 weeks ago.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and formler.dart. Packages with multiple examples should provide example/

For more information see the pub package layout conventions.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.20.1 <3.0.0
logging >=0.9.3 <0.12.0 0.11.4
Dev dependencies
test any