mirror of
https://github.com/msfjarvis/msfjarvis.dev.git
synced 2024-06-03 04:18:56 +05:30
Fix formatting
Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
This commit is contained in:
parent
5f7ba57a04
commit
dc03b7b757
|
@ -72,7 +72,7 @@ If you pay attention to the [commit](https://github.com/msfjarvis/dagger-the-eas
|
|||
|
||||
## Initializing our component
|
||||
|
||||
Now for Dagger to know when to create this graph, it needs to be able to know how to initialize the `Component` we wrote earlier. For this, we'll be adding a factory that constructs the `AppComponent`. Since we need a Context to be able to create `SharedPreferences`, we'll make our factory accept a context parameter. Here's how the finished `AppComponent looks like with the factory method.
|
||||
Now for Dagger to know when to create this graph, it needs to be able to know how to initialize the `Component` we wrote earlier. For this, we'll be adding a factory that constructs the `AppComponent`. Since we need a Context to be able to create `SharedPreferences`, we'll make our factory accept a context parameter. Here's how the finished `AppComponent` looks like with the factory method.
|
||||
|
||||
```kotlin
|
||||
@Singleton
|
||||
|
|
Loading…
Reference in New Issue
Block a user