mirror of
https://github.com/pese-git/cherrypick.git
synced 2026-01-24 05:25:19 +00:00
fixed docs and code
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
Binding is a custom instance configurator that contains methods for configuring a dependency.
|
||||
|
||||
There are two main methods for initializing a custom instance `toInstance ()` and `toProvide ()` and auxiliary `withName ()` and `singeltone ()`.
|
||||
There are two main methods for initializing a custom instance `toInstance()` and `toProvide()` and auxiliary `withName()` and `singleton()`.
|
||||
|
||||
`toInstance()` - takes a initialized instance
|
||||
|
||||
@@ -36,7 +36,7 @@ Example:
|
||||
// instance initialization like singleton
|
||||
Binding<String>().toInstance("hello world");
|
||||
// or
|
||||
Binding<String>().toProvide(() => "hello world").singeltone();
|
||||
Binding<String>().toProvide(() => "hello world").singleton();
|
||||
|
||||
```
|
||||
|
||||
@@ -111,7 +111,7 @@ class FeatureModule extends Module {
|
||||
),
|
||||
),
|
||||
)
|
||||
.singeltone();
|
||||
.singleton();
|
||||
bind<DataBloc>().toProvide(
|
||||
() => DataBloc(
|
||||
currentScope.resolve<DataRepository>(named: "networkRepo"),
|
||||
|
||||
Reference in New Issue
Block a user