Member-only story

Flutter 3.0: Implement dynamic Theming using Bloc-Cubit

Eric Anicet
5 min readSep 18, 2023

--

In this story, we’re going to learn how to implement dynamic theming in a Flutter app using Bloc as state management.

· Prerequisites
· Getting Started
Project creation
Add the dependencies
Add the logic classes
Apply theme
· Project structure
· App Results
· Conclusion
· References

Prerequisites

This is the list of all the prerequisites for following this story:

  • Flutter 3+ installed
  • Basic knowledge of Dart and Flutter
  • Android Studio or Visual Studio Code

Getting Started

Today, most mobile applications have introduced a dark mode to enhance the user experience. Users can switch themes and choose what suits them best. Flutter defines a visual theme to share the colors, style, and other parameters applicable to the Material component type throughout the application or in particular parts of it.

Flutter applies styling in the following order:

  1. Styles applied to the…

--

--

No responses yet