fixed docs and code

This commit is contained in:
Sergey Penkovsky
2021-12-10 22:04:51 +03:00
parent 7a53844c7d
commit 58245fb665
7 changed files with 43 additions and 43 deletions

View File

@@ -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"),