flutter dynamically change app theme. change theme dynamically

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
friends i am charles from shawn today i am going to show how to implement dynamic theme so let's check our demo first this is our demo we are also implement it as like so let's start so this is our ui there have only my app and also my home pages also and there have only one show dialog so first of all we have to need our three packages provider shared preferences and go radio button so let's start our app will running so now install our stream so now we have to need create our dialog also so please wait for reading our app so there are nothing else so first all of all our theme dialogue also now reload it and also change the place the same thing there are empty dialog so we are also read it so now go to our show dialog builders and data analog dialog now we are also implemented radio group radio group dot builder so it's on chains items and also buildings so this is also string now we have to pass group value also selected color and on change also value set a step now pass selected color also this value now print selected color that's it now item also our colors colors items and item builders also item radio builder radio button builder also item that's it so now check our this blade radio button also working or not so press sends the thing also dark light green also easily working so now we have to need our another pair page also so now make theme notifier dot dot so now create net class theme notifier extends since notified so now now we need to make theme data we will implement uh our custom dynamic theme so clean that up now get them data get thing also this thing that now said thing theme data also thin data and this thing that also this theme data okay now notify listener that's it and now we have to need our password this thing that also in constructor okay our provider also ready so now we are also we have made another dart page also so color sorry is color dot dot okay now we have to take thin data active thing so then we have net color also final dark thing thin data also need four colors dark thing light thing and you will add as you like what type you are also want to change color canvas color button you will change here from this so the radio theme primary thing primary extreme also so our display is also ready so first of all we are also go to our home page and we will sorry go to maintenance so first of all we have to need our provider so multi-provider providers so we have my first joint this my app so science provide us so now we are also unsure would get bundling first this filter binding dot ensure initialize and then we have to need so we will pass our now change notifier notifier also now make our context and also pass our this thing modify provider so input it so we are also imported and now what we have need this we have to need this one parameter pass so this parameter also will be passed from here so now we are also set now demo purpose that thing now we are also pass thing data now import it okay now is missing both okay so now check also dark green also working so we have to need when you paste things it will be changed automatically so now you turn it at once think sense synchronize now we have to move pass string also string value and you have to need team notifier thing notifier so if value equal to dark so what we will doing here so we are also doing here now thing editor equal theme modifier dot set thing also say thing light so it will light thing now copy this piece green also also green thing now else one of these also blue so now we are also set our theme modifier data so we also pass here so now we need another also defenses final references equal average shade predances dot get instance now defenses the set string also team mode and this value also this value so that's it so now we have to need to set this method so by nonsense we are also change this network option also so there are many two parameter one of the string value also and another is theme notifier okay so this thing notified now we have to need this thin sense dialog at this parameter so now we have to need final final we have need team mode equal provider dot we put it provider dot of context now thing dot sorry we have to need pass here team beautiful so now take get thing also now we are also theme notifier this is thing multiplier thing notification so we are also get our theme now we actually pass this three modifier this thing sends dialogue also that's it so no problem this is this hero coming so we are also remove this so now we have to need go to main and now what we will do here shape preferences without getting stamps don't then these preferences so now we have to need preferences dot great steering our key also our key also distinguished now check if theme color equal to dark now we have to need pass on this active theme also deals with equal to light will pass here equal to light everything and also green so now we have to make past this active thing this that thing effective thing so that's it now restart us our project so now we are get our project also green light also working but we have getting your color is not some type of type color so we have to change something that is not black also grey okay no problem no problem so now we have to need to change our this theme data also our 80 thing that's it now we start our project this thing also change now green light also it will come so now check again we are using something color light thin also light not black printing also white i think white is so now we start again now thing were also blue now paint light dark also light color is problem now i have made my color set also so i will put it here so remove this and paste it here okay so we have to need this final theme notifier equal to provider of context thing notified and we have to need an empty theme also now change our thing so we have to need this put it our this main section also this preferences also that's it now reload fully so now check our changes theme so please register the project so our opposite has been ready so now it's a green dark glue also working nicely so dark and green light blue so this is amazing so thank you for watching my video assalamualaikum
Info
Channel: Shajedul Islam Shawon
Views: 6,213
Rating: undefined out of 5
Keywords: flutter change theme dynamically, flutter tutorial, flutter, chnage theme dynamically, how to change theme dynamically, flutter change app theme, make dynamic theme, flutter theme change, change theme, flutter radio button, flutter group radio button, use radio button, flutter group button tutorial, flutter shared preferences, custome theme, easy theme, dynamic theme in flutter, how to dynamic multiple theme, how can i change, how can i change flutter app theme automatically
Id: wbHYho6zoyE
Channel Id: undefined
Length: 20min 54sec (1254 seconds)
Published: Fri Apr 09 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.