Dynamic Themes Switching (Dark / Light) with Streams - Flutter in Practice 48

Опубликовано: 04 Август 2020
на канале: Zaiste Programming
2,143
64

Streams can be used in complex ways for complex problems, but they can also be used in simple ways! In this episode, I'll show you how to use streams for switching themes of a Flutter application. We will start by defining a boolean store to hold the current selected theme (Dark or Light). Then, we will add a button to our element that will trigger the theme switch. Finally, we will observer our application and react to the changes in the store via the exposed stream. As a bonus, we will slightly refactor our application using some convenience classes from the Sprinkle library.

Flutter in Practice is a free programming course that teaches how to write a mobile application using Flutter framework and Dart programming language. Instead of teaching concepts and ideas in both Flutter and Dart, this course showcases a process of building an actual, mobile application. Our goal is to create an email client that supports the JMAP protocol.

Flutter from A to Z is 12-week course about Flutter (work-in-progress). Subscribe for updates:
https://landing.mailerlite.com/webfor...

Join the Discord channel:   / discord  
Follow me on Twitter:   / zaiste  

#flutter #streams #tutorial


Смотрите видео Dynamic Themes Switching (Dark / Light) with Streams - Flutter in Practice 48 онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Zaiste Programming 04 Август 2020, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 2,143 раз и оно понравилось 64 людям.