How to add Dark mode in Flutter with Provider | Shared Preferences | Adaptive Theming

Sdílet
Vložit
  • čas přidán 9. 07. 2024
  • By the end of this tutorial, you will be able to seamlessly integrate light and dark themes into your own apps.
    All the assets and code are available in the link below.
    Source Code: github.com/Flutter-ui-dev/Flu...
    00:00 - Intro
    00:25 - Coding UI
    05:06 - Creating Theme Provider
    06:45 - Integrating Provider With UI
    10:17 - Persisting Theme using Shared Prefs
    #flutter #flutterdev #theming #darkmode

Komentáře • 16

  • @thainguyen4808
    @thainguyen4808 Před 11 měsíci

    You have covered many wonderful things in a concise and informative manner

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

    Super bro

  • @dev.bojack
    @dev.bojack Před 11 měsíci

    This was perfect.

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

    really helpful also clean code using provider arch.

  • @iznasen
    @iznasen Před 2 lety +1

    the best ever!

  • @flutterwithabdul6142
    @flutterwithabdul6142 Před rokem

    very help full

  • @bhon2110
    @bhon2110 Před 2 lety

    Thank you for the tutorial,
    I want to know how can we get the theme from prefs before it builds the UI to the user.
    Instead of building the UI first, then change the theme.

    • @flutteruidev
      @flutteruidev  Před 2 lety

      I guess setting the themeMode in material app according to prefs will do the job

  • @LeeCasey
    @LeeCasey Před rokem

    How do you customise with .copyWith()?

    • @flutteruidev
      @flutteruidev  Před rokem

      The copyWith method can be use with almost any material properties,
      To customise just call it and pass the parameters that you want to customise, it is really that simple

  • @davidnestico
    @davidnestico Před rokem

    i followed step by step idk why it's not working, there aren't even any errors that it's showing 😭

  • @kickart7517
    @kickart7517 Před 2 lety +1

    i get an error in themeMode: provider.themeMode