Dependency Injection in Flutter - You HAVE to Use it !

Поділитися
Вставка
  • Опубліковано 10 лип 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
  • Наука та технологія

КОМЕНТАРІ • 36

  • @Hamiiidev
    @Hamiiidev 9 місяців тому

    Great video Arkadash :)

  • @muammar88
    @muammar88 4 місяці тому

    Well done! Thank you!

  • @leonardo_ruizz
    @leonardo_ruizz 27 днів тому

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

  • @RapidSporty
    @RapidSporty 5 місяців тому

    Very great!😃

  • @bendzbodoi
    @bendzbodoi 6 місяців тому

    thank's for content and subtitle!

  • @caio7369
    @caio7369 Місяць тому

    Great video!

  • @minseokjeong1881
    @minseokjeong1881 9 місяців тому

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

  • @mohammedek6269
    @mohammedek6269 3 місяці тому

    Explained very well🎉

  • @hiwa_sh6813
    @hiwa_sh6813 9 місяців тому +6

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

    • @flutterguys
      @flutterguys  9 місяців тому

      Yes , Sure ...
      We recently started bloc course

  • @jaanaan143
    @jaanaan143 3 місяці тому

    That was helpful thanks.

  • @androidterminal3924
    @androidterminal3924 9 місяців тому

    Wow, understood DI from just a 7 minute video!

  • @trapeye3464
    @trapeye3464 9 місяців тому

    How about prrovider, can provider use decency injection

  • @billiardoxx
    @billiardoxx 7 місяців тому

    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.

  • @edward9876
    @edward9876 9 місяців тому

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

  • @aouadicharaf1038
    @aouadicharaf1038 9 місяців тому

    ❤❤❤

  • @hosseinvejdani183
    @hosseinvejdani183 8 місяців тому

    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  8 місяців тому

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

  • @yasinkaracan7308
    @yasinkaracan7308 9 місяців тому

    nice

  • @im_swapnil_musale
    @im_swapnil_musale 9 місяців тому +2

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

  • @KyoYamamoto-rc5jp
    @KyoYamamoto-rc5jp 9 місяців тому

    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  9 місяців тому +1

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

    • @KyoYamamoto-rc5jp
      @KyoYamamoto-rc5jp 9 місяців тому

      @@flutterguys Thanks for the quick response!

  • @salsichalivre5401
    @salsichalivre5401 6 місяців тому

    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 8 місяців тому

    Isn't this similar to provider?

  • @manishgautam2424
    @manishgautam2424 3 місяці тому

    injectable please

  • @faheemahmad5853
    @faheemahmad5853 6 місяців тому +2

    kindly improve the ACCENT and AUDIO

  • @Miasdsadas
    @Miasdsadas Місяць тому

    great