Тёмный

Dagger Hilt - Assisted Inject Hilt in Android! 

Charfaoui Younes
Подписаться 6 тыс.
Просмотров 1,2 тыс.
50% 1

✅ The Android Code Review Checklist 👉 bit.ly/android-checklist
📩 Sign up for my new newsletter here 👉 bit.ly/YCNewsletter102
Join my Community on Discord:
/ discord
In this video, we will learn how to help or assist the creation of an object that requires multiple values, parameters that can be passed by the DI framework, and parameters that can be passed at the create time, aka assisted by the user.
🔗 Links:
- Android Documentation - developer.android.com/trainin...
- Hilt Documentation - dagger.dev/hilt/
- Codelab - developer.android.com/codelab...
=====================
🔥 Want to improve your refactoring skills? Check out this challenge 👇
bit.ly/47dzTLT
=====================
👨🏽‍🏭 Who I am:
I'm Younes Charfaoui, a Software Engineer and an Android Developer. I make videos about Android development, Technology, and Productivity for software engineers.
😋 Be My Friend:
💻 GitHub - github.com/Younes-Charfaoui/
🐦 Twitter - / charfaouiyounes
📑 Medium - / mxcsyounes
📷 Instagram - / charfaoui.younes
🌍 My website - www.charfaouiyounes.com

Опубликовано:

 

5 фев 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 10   
@nilaxgajjar.work8
@nilaxgajjar.work8 Месяц назад
Hey Thanks for showing this Usecase. I was facing an issue in a similar situation where I was getting a response from Retrofit. Once I received a data object from API, I needed to create an object of the manager class using HILT.
@CharfaouiYounes
@CharfaouiYounes Месяц назад
Glad it helped
@RajendraKumar-ds5xw
@RajendraKumar-ds5xw 4 месяца назад
How To Create Own Library In AndroidStudio Latest Version Hedgehong because i am facing Compatibility issue with 8.2, please make video on this topic
@alanesaugarciagutierrez6025
@alanesaugarciagutierrez6025 4 месяца назад
Hi good video, have you ever used this in practice? What would be the use case? Because for this example I think that the approach of injecting the sharedPreferences would be better, it occurs to me perhaps to pass an id to a dialog although I don't know if it would be better to pass them as arguments and only obtain them in the viewmodel using the savedStateHandle (?)
@CharfaouiYounes
@CharfaouiYounes 4 месяца назад
savedStateHandle is also a good practice, I am just showing what you have as options. I used it previously to get data from the user via runtime (after validation), and it was much better.
@nadiamegherbi3464
@nadiamegherbi3464 4 месяца назад
@XuanQuynhLexuanquynh
@XuanQuynhLexuanquynh 3 месяца назад
handsome bro. I like your tutorials.
@CharfaouiYounes
@CharfaouiYounes 3 месяца назад
I really appreciate that brother!
@itsjeffo
@itsjeffo 3 месяца назад
i prefer call init() 😅
@haryakumuda6798
@haryakumuda6798 2 месяца назад
is it updated? I cannot refer "by viewModels" only "by viewModel" and I always get error. Overload resolution ambiguity on method 'getValue(Nothing?, KProperty*>)'. All these functions match. @Inject lateinit var factory : AddMomentViewModel.AddMomentViewModelFactory val test = AddMomentViewModel.provideViewModel(momentId, factory) private val addMomentViewModel: AddMomentViewModel by viewModel( factory = test)
Далее
Dagger Component, Subcomponent, Scope, Reusable
22:38
My little bro is funny😁  @artur-boy
00:18
Просмотров 5 млн
I Built a SECRET McDonald’s In My Room!
36:00
Просмотров 10 млн
Kotlin Context Receivers Made Easy!
8:01
Просмотров 699
Hilt and dependency injection - MAD Skills
13:06
Просмотров 46 тыс.
Все про Dagger Hilt в Android Studio + Kotlin
52:11
What does larger scale software development look like?
24:15