ddi 0.1.1

Flutter Android iOS web

A lightweight powerful Dependency Injection package brought to you by XED. DDI will make your development & debuging easier & faster.

Dart Dependency Injection #

Getting Started

1/ Binding:

class TestModule extends AbstractModule {
    @override
    void init() {
	    bind(String).to("A String Instance");
	    bind(int).to(404);
	    bind(TestClass).to(new TestClass(this.get(String)));
	    bind("AnotherTestClass").to(new TestClass("AnotherTestClass"));
    }
}

2/ Use your DI

void main() {
    DI.init([new TestModule()]);
    String str = DI.get(String);
    expect(str, equals("A String Instance"));
}
1
likes
100
pub points
38%
popularity

A lightweight powerful Dependency Injection package brought to you by XED. DDI will make your development & debuging easier & faster.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

sang@x.education

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on ddi