wired 0.4.5

  • readme.md
  • Installing
  • Versions
  • 39



Part of the Dart Force Framework.

A library to do dependency injection! It uses the same annotations as in java spring applications.


To bootstrap your injections call


To configure your classes make a configuration class

class SomeConfig {

  Counter counter() {
    return new Counter();

  Calc calc() {
    return new Calc();


When you want to access an instance you can call


You can also define Components by using the @Component annotation

For the moment we only support set dependency injections and not constructor dependency injection.


You can use a Qualifier to give the bean a specific name, it is usefull when you want to configure 2 instances of the same class.

@Qualifier(name: "firstCounter")
Calc calc() {
	return new Calc();


You can add yaml values into your classes. First add them to the applicationContext. The first value is the key of the messages and the second value is the yaml content.

ApplicationContext.registerMessage("sentences", "sentence: Is this good?");

Register the messages before calling the method bootstrap of ApplicationContext.

You can add the @Value annotation into a scanned bean.

String value;

You can also get a value from ApplicationContext, like follow:



With the @order annotation we can set the order of a configuration class.

class ConfigComp { }


  • add posibility to add @Autowired in constructor values

Notes to Contributors

Fork Wired

If you'd like to contribute back to the core, you can fork this repository and send us a pull request, when it is ready.

If you are new to Git or GitHub, please read this guide first.

Dart Force

Realtime web framework for dart that uses forcemvc & forcemirrors & wired source code


Follow us on twitter https://twitter.com/usethedartforce


Follow us on google+


This file contains highlights of what changes on each version of the wired package.

Pub version 0.4.5

  • @Value annotations can now be any valid YAML value

Pub version 0.4.4

  • At annotation @order into the library, @order helps you to order the configuration classes.

Pub version 0.4.3+1

  • look at interfaces on all levels (getBeanByType)

Pub version 0.4.3

  • getBeanByType, also look at his interfaces!

Pub version 0.4.2

Fix issue with getBeanByType, when more beans are in the pool, adapt tests

Pub version 0.4.1

Adapting getBeanByType so it will accept also and can work with subclasses and superclasses

Pub version 0.4.0

Adding setBean method in ApplicationContext Update dependencies to mirrorme (renaming forcemirrors) this is not bc

Pub version 0.3.2+1

Update YAML dependency.

Pub version 0.3.2

Add static method getBeanByType on ApplicationContext Also resolve autowired cases by Type and not only by name Rename package to 'wired'

Pub version 0.3.1

Improved the addComponents method

Pub version 0.3.0

Add documentation Change component(Scanner scanner) to addComponents(Iterable objs) Change MetaDataHelper().getVariableMirrorValues(obj) to MetaDataHelper<_Autowired, VariableMirror>().from(obj) Change MetaDataHelper().getMirrorValues(obj) to MetaDataHelper<_Bean, MethodMirror>().from(obj)

Pub version 0.2.1+1

Moving repo to ForceUniverse organisation

Pub version 0.2.1

Fix scanning of config classes and component classes.

Pub version 0.2.0

Remove parentheses from annotations.

Pub version 0.1.3+2

Yaml value can be anything! Change the return type to dynamic to get a value!

Pub version 0.1.3+1

Adding a method to get a value from a yaml file through ApplicationContext.

Pub version 0.1.3

Now you can inject yaml values into your dart classes.

Pub version 0.1.2

Adding the Qualifier annotation to this package, so you can name the beans you configure.

Pub version 0.1.1 & 0.1.1+1

Make it possible to switch order of the classes when they are created!

Pub version 0.1.0+1

Adding documentation

Pub version 0.1.0

Initial setup of the package

1. Depend on it

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

  wired: "^0.4.5"

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:wired/wired.dart';
Version Uploaded Documentation Archive
0.4.5 Jun 3, 2016 Go to the documentation of wired 0.4.5 Download wired 0.4.5 archive
0.4.4 Dec 15, 2015 Go to the documentation of wired 0.4.4 Download wired 0.4.4 archive
0.4.3+1 Jan 22, 2015 Go to the documentation of wired 0.4.3+1 Download wired 0.4.3+1 archive
0.4.3 Jan 17, 2015 Go to the documentation of wired 0.4.3 Download wired 0.4.3 archive
0.4.2 Jan 16, 2015 Go to the documentation of wired 0.4.2 Download wired 0.4.2 archive
0.4.1 Jan 16, 2015 Go to the documentation of wired 0.4.1 Download wired 0.4.1 archive
0.4.0 Jan 8, 2015 Go to the documentation of wired 0.4.0 Download wired 0.4.0 archive
0.3.2+1 Oct 11, 2014 Go to the documentation of wired 0.3.2+1 Download wired 0.3.2+1 archive
0.3.2 Aug 31, 2014 Go to the documentation of wired 0.3.2 Download wired 0.3.2 archive


This feature is new.
We welcome feedback.
More details: scoring.

We analyzed this package, and provided a score, details, and suggestions below.

  • completed on Feb 3, 2018
  • Dart: 2.0.0-dev.20.0
  • pana: 0.10.1


Describes how popular the package is relative to other packages. [more]
7 / 100
Code health derived from static analysis. [more]
98 / 100
Reflects how tidy and up-to-date the package is. [more]
33 / 100
Overall score:
Weighted score of the above. [more]


Detected platforms: web, other

Primary library: package:wired/wired.dart with components: mirrors.


  • 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.

    Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use wired.dart.


Package Constraint Resolved Available
Direct dependencies
mirrorme >=0.2.2 <0.3.0 0.2.2
yaml >=2.0.1+1 <3.0.0 2.1.13
Transitive dependencies
charcode 1.1.1
collection 1.14.5
path 1.5.1
source_span 1.4.0
string_scanner 1.0.2
Dev dependencies
unittest >=0.9.0 <0.9.1