Dependency Injection in Flutter - You HAVE to Use it !

Sdílet
Vložit
  • čas přidán 27. 07. 2024
  • 📄Dependency Injection (DI) is a design pattern used to implement Inversion of Control. It allows the creation of dependent objects outside of a class and provides those objects to a class through different ways. Using DI, we move the creation and binding of the dependent objects outside of the class that depends on them. This brings a higher level of flexibility, decoupling, and easier testing.
    🌐 Telegram Community
    🔗 t.me/flutterguysgp
    📁Source Code
    🔗 github.com/Fabrice-Fabio/depe...
    🌐 Social Media
    🔗 Linkedin:
    / fabrice-sumsa-9b1133151
    / mahdinazmi
    🔗 GitHub:
    github.com/Fabrice-Fabio
    github.com/mahdinazmi
    ⏳ TIMESTAMPS :
    00:00 Intro
    00:22 Join Telegram Community
    00:40 Why DI With GetIt?
    01:04 Without DI
    02:04 Ways To Registering Instances
    02:49 Register Singleton
    05:36 Register Lazy Singleton
    06:33 Register Factory
    #flutter #fluttertutorial #fluttercourse #flutterwidgets
  • Věda a technologie

Komentáře • 36

  • @leonardo_ruizz
    @leonardo_ruizz Před měsícem

    Great video! Thanks for the explanation, it really helped me!

  • @Hamiiidev
    @Hamiiidev Před 10 měsíci

    Great video Arkadash :)

  • @minseokjeong1881
    @minseokjeong1881 Před 9 měsíci

    I love every your contents. Your contents is somewhat different than other flutter related youtuber. YOU NAILED IT!

  • @muammar88
    @muammar88 Před 5 měsíci

    Well done! Thank you!

  • @bendzbodoi
    @bendzbodoi Před 6 měsíci

    thank's for content and subtitle!

  • @caio7369
    @caio7369 Před 2 měsíci

    Great video!

  • @RapidSporty
    @RapidSporty Před 6 měsíci

    Very great!😃

  • @mohammedek6269
    @mohammedek6269 Před 4 měsíci

    Explained very well🎉

  • @hiwa_sh6813
    @hiwa_sh6813 Před 10 měsíci +6

    Great video as usual 💜
    Please make videos on state management in real & complex projects.
    Thanks

    • @flutterguys
      @flutterguys  Před 10 měsíci

      Yes , Sure ...
      We recently started bloc course

  • @jaanaan143
    @jaanaan143 Před 4 měsíci

    That was helpful thanks.

  • @androidterminal3924
    @androidterminal3924 Před 10 měsíci

    Wow, understood DI from just a 7 minute video!

  • @aouadicharaf1038
    @aouadicharaf1038 Před 10 měsíci

    ❤❤❤

  • @edward9876
    @edward9876 Před 10 měsíci

    easy to understand thank you I hope you to show video using injectable plz

  • @billiardoxx
    @billiardoxx Před 8 měsíci

    Hi, I'm trying to understand how/when/why to use "injectable" package with get_it package for DI. Injectable is supposedly useful for boilerplate and other useful features like modules. I would ask that you could make an example application with just get_it, and then transform that same application into another "simplified" one with the help of the "injectable" package, in such a way that one could see how useful said package could be, or under what circumstances it is. I currently find it difficult to understand its use, and the current tutorials found on the Web do not provide much help. "injectable" has a notation called "module" that seems useful in a "features" approach but without comparing how it would be presented with just "get_it" you don't fully understand the mechanism behind it.

  • @yasinkaracan7308
    @yasinkaracan7308 Před 10 měsíci

    nice

  • @trapeye3464
    @trapeye3464 Před 9 měsíci

    How about prrovider, can provider use decency injection

  • @im_swapnil_musale
    @im_swapnil_musale Před 10 měsíci +2

    Thanks for this video it will be great if you add injectable support as well

  • @hosseinvejdani183
    @hosseinvejdani183 Před 9 měsíci

    Thank you 🌹. I have a question. Is it possible to register a service with input argument? If yes how we can pass argument to service class inside the app programmatically?

    • @flutterguys
      @flutterguys  Před 9 měsíci

      Yes you can pass get it instance instead of argument like this : sl()

  • @KyoYamamoto-rc5jp
    @KyoYamamoto-rc5jp Před 10 měsíci

    Great video! Thanks for the informative content, sir.
    One question! If the app is using Riverpod, would you consider using `get-it` as dependency injection?

    • @flutterguys
      @flutterguys  Před 10 měsíci +1

      Yes , It doesn't matter what state management you use...

    • @KyoYamamoto-rc5jp
      @KyoYamamoto-rc5jp Před 10 měsíci

      @@flutterguys Thanks for the quick response!

  • @salsichalivre5401
    @salsichalivre5401 Před 7 měsíci

    Yes, the video is nice, but I never recommend using this as state management. Use it as Dependency injection solution only, so you can make our app loosely coupled class to class.

  • @madhuparanjpe4176
    @madhuparanjpe4176 Před 9 měsíci

    Isn't this similar to provider?

  • @faheemahmad5853
    @faheemahmad5853 Před 6 měsíci +2

    kindly improve the ACCENT and AUDIO

  • @manishgautam2424
    @manishgautam2424 Před 3 měsíci

    injectable please

  • @Miasdsadas
    @Miasdsadas Před 2 měsíci

    great