After this lesson you will
- Write a Koin module with module { } and understand that a lambda only runs when someone asks
- Choose single or factory based on the state and resources a class holds
- Bind an implementation to an interface and use a qualifier when a type has two definitions
Duration25 min
DifficultyIntermediate
Koin DSL: module, single, factory
Koin DSL with module, single and factory in the Mobile Action Pro course.
- 01Lesson Goal
- 02Part 1: Declaring With module
- 03Part 2: single
- 04Part 3: factory
- 05Part 4: Bind To An Interface
- 06Part 5: Two Definitions Of The Same Type
- 07Practice Exercise
- 08Code Reading Path
- 09Signs To Avoid
- 10References
- 11Key Points
Topics: kotlin, 07-dependency-injection
11 sections left in this lessonUnlock all of Mobile Action ProLesson Goal, Part 1: Declaring With module, … — plus 114 lessons in this course, source code and checklists.
Unlock Mobile Action ProOne-time payment — lifetime access — 7-day money-back. Already purchased? Sign in