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

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

КОМЕНТАРІ • 16

  • @thainguyen4808
    @thainguyen4808 Рік тому

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

  • @dev.bojack
    @dev.bojack Рік тому

    This was perfect.

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

    Super bro

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

    really helpful also clean code using provider arch.

  • @iznasen
    @iznasen 2 роки тому +1

    the best ever!

  • @flutterwithabdul6142
    @flutterwithabdul6142 Рік тому

    very help full

  • @bhon2110
    @bhon2110 2 роки тому

    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  2 роки тому

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

  • @LeeCasey
    @LeeCasey Рік тому

    How do you customise with .copyWith()?

    • @flutteruidev
      @flutteruidev  Рік тому

      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 Рік тому

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

  • @kickart7517
    @kickart7517 2 роки тому +1

    i get an error in themeMode: provider.themeMode