Light and Dark mode with cubit

Overview

Light and Dark mode with cubit

This project will explain how we can implement the light and dark mode with Cubit state management architecture.

Project Created & Maintained By

MultiQoS Pvt. Ltd.

Getting Started

The easiest way to add theme support in application by using the Cubit state management. In this demo we are updating the backgorund color and text color for button and lables.

Dependencies

  1. Bloc: Used flutter_bloc library for state management. Bloc
  2. Shared Preference: Used shared_preferences library for local storage. Shared Preference

Folder and Class structure

.
├── ...
├── Cubit                        # This folder hold all cubit sub folders.
│   └── theme_module             # This folder will hold two sub folder provider and states.
│         ├── provider           # This folder will hold them cubit class.
│         └── states  		 # This folder will hold theme state class.
│   
├── theme                        # This folder hold all the themes related classes.
│   ├── base_theme               # This an abstract class for color setup
│   ├── dark_theme               # This class will have all dark theme colors and extend the base_theme class. 
│   ├── light_theme              # This class will have all light theme colors and extend the base_theme class. 
│   ├── theme_colors             # All colors will define in this class. For light mode, LightThemeColors class and for dark mode, DarkThemeColors is being used for color declaration.
│   └── enum                     # Delcared the theme enum in this class.
└── ...

Demo

Screen.Recording.2022-04-19.at.12.56.41.PM.mov
You might also like...

Widget for selecting between ThemeMode.dark and ThemeMode.light

Widget for selecting between ThemeMode.dark and ThemeMode.light

ThemeModeSelector Widget I am currently working with the concept of Theme's in Flutter and I wanted to build a widget which would allow me to switch b

Oct 26, 2022

Flutter-Theme-Changer - Change theme of your app from light to dark theme and vice versa

Flutter Theme Changer - Hard Coded This is a flutter theme changer without using

Oct 17, 2022

This is a message/chat app with light and dark theme options

This is a message/chat app with light and dark theme options

this is a message/chat app #ui using #flutter that runs both Android and iOS devices also has a dark and light theme. We create in total 4 screens all

Dec 30, 2022

Beautiful Weather App UI with support for dark mode. Created by Martin Gogołowicz.

Beautiful Weather App UI with support for dark mode. Created by Martin Gogołowicz.

Flutter Weather App UI with darkmode support Flutter 2.8.0 Null Safety Beautiful Weather App UI with support for dark mode. Created by Martin Gogołowi

Dec 6, 2022

Flutter Ebook App UI with support for dark mode

Flutter Ebook App UI with support for dark mode

Flutter Ebook App UI with darkmode support Flutter 2.8.0 Null Safety Beautiful E

Aug 29, 2022

Car-Rental-App-UI-Flutter - Beautiful Car Rental App UI with support for dark mode. Created by Martin Gogołowicz.

Car-Rental-App-UI-Flutter - Beautiful Car Rental App UI with support for dark mode. Created by Martin Gogołowicz.

Flutter Car Rental App UI with darkmode support Flutter 2.8.1 Null Safety Beautiful Car Rental App UI with support for dark mode. Created by Martin Go

Dec 28, 2022

Binary clock - Flutter binary clock with Dark mode support

Binary clock - Flutter binary clock with Dark mode support

Binary Clock This is a binary clock created using Flutter containing both Light and Dark modes Getting Started This project is a starting point for a

Dec 31, 2019

NFT Marketplace App UI with support for dark mode. Created by Martin Gogołowicz under 6 hours.

NFT Marketplace App UI with support for dark mode. Created by Martin Gogołowicz under 6 hours.

Flutter NFT Marketplace App UI with darkmode support Flutter 2.8.1 Null Safety NFT Marketplace App UI with support for dark mode. Created by Martin Go

Dec 13, 2022
Owner
MultiQoS Technologies Pvt. Ltd.
MultiQoS is a widely acclaimed technology company with a global footprint and several industry-benchmarked mobile apps and enterprise web apps.
MultiQoS Technologies Pvt. Ltd.
Hotel-Booking-App-UI - Beautiful Hotel Booking App UI with support for dark and light mode

Flutter Hotel Booking App UI with support for dark and light mode. Flutter 2.8.1

Martin Gogołowicz 11 Nov 1, 2022
Shoes-Store-App-UI-Flutter - Beautiful Shoes Store App UI with support for dark and light mode

Flutter Shoes Store App UI with support for dark and light mode. Flutter 2.8.1 N

Jakub Sobański 4 Nov 23, 2022
Custom Clock App With GetX And Dark Theme & Light Mode

Clock App ✍?? Clock App with GetX [MVC pattern] ????‍?? Clock App app is open-source app for Android & ios. It is built with Dart on top of Google's F

null 12 Oct 21, 2022
Flutter chat-app UI with multiple themes & light + Dark mode.

Chat-App UI Only a PART of code available, for complete code ping here Features of the app - Light Mode + Dark Mode 4 different color themes - pink/te

Deepa Pandey 31 Oct 5, 2022
Flutter bloc cubit test knowdge - Flutter bloc cubit test knowdge

Flutter Bloc Simple Api This project is using weather api for featch data and di

Waruna Kaushalya 0 Jan 3, 2022
Flutter application for latest news by top newspapers . And allow for share articles with friends. Now available in night mode. Also landscape mode is available

Breaking News Latest news for almost 55 country. Feature of saving article and search ariticles. Used API https://newsapi.org/ Note: if data is not ge

null 7 Oct 24, 2022
This perfect starter kit is an app based on React Native and UI Kitten library with Light and Dark themes support.

Kitten Tricks This perfect starter kit is an app based on React Native and UI Kitten library with Light and Dark themes support. It’s completely free

Akveo 7k Dec 30, 2022
Beautiful Weather App using API with support for dark mode. Created by Jakub Sobański ( API ) and Martin Gogołowicz (UI, API help)

Flutter Weather App using API with darkmode support Flutter 2.8.1 Null Safety Beautiful Weather App using https://github.com/MonsieurZbanowanYY/Weathe

Jakub Sobański 5 Nov 29, 2022
Easiest way to add support for light and dark theme in your flutter app.

Adaptive Theme Easiest way to add support for light and dark theme in your Flutter app. It allows to manually set light or dark theme and also lets yo

Birju Vachhani 287 Dec 27, 2022
Chat Messaging App Light and Dark Theme

Chat/Messaging App Light and Dark Theme - Flutter UI Watch it on YouTube Complete Source Code (Patreon only) Packages we are using: goole_fonts: link

Abu Anwar 1.4k Jan 6, 2023