Dependency injection is a core concept of software development. In this video, I’ll show you how you can apply DI in an Android app using Dagger-Hilt.
- 00:00 – What is dependency injection?
- 06:45 – Setting up Dagger-Hilt
- 08:25 – Setting up the structure
- 10:39 – Creating a module
- 17:20 – Injecting into ViewModels
- 20:15 – Injecting the ViewModel in the UI
- 21:40 – Creating the application class
- 24:05 – Two dependencies of same type
- 26:20 – Binding abstractions
- 29:58 – Field injection
- 31:28 – Lazy injection
Mobile \ Read more \ 11.08
Into the piggy bank of interesting facts about Objective-C. Recently, I wrote about the fact that the language has the...
SwiftUI: Packaging Views
Learn how to extract your SwiftUI view into a Swift Package that you can reuse in your other apps! In...
Starscream – WebSocket in Swift.
Starscream is a conforming WebSocket (RFC 6455) library in Swift. Features Conforms to all of the base Autobahn test suite. Nonblocking....
Microsoft opens emoji from Windows 11
Developers can take most of Microsoft's bright and colorful 3D emoji and turn them into stickers, use them in content,...
Mobile \ Read more \ 10.08
Read more about iOS and Android development.
Kotlin Symbol Processing API – Kotlin for compiler plugins
Kotlin Symbol Processing (KSP) is an API that you can use to develop lightweight compiler plugins. KSP provides a simplified...