{"id":6551,"date":"2023-06-30T08:44:06","date_gmt":"2023-06-30T08:44:06","guid":{"rendered":"https:\/\/dianapps.com\/blog\/?p=6551"},"modified":"2023-06-30T08:44:06","modified_gmt":"2023-06-30T08:44:06","slug":"flutter-theming-light-and-dark-theme-with-custom-color","status":"publish","type":"post","link":"https:\/\/dianapps.com\/blog\/flutter-theming-light-and-dark-theme-with-custom-color\/","title":{"rendered":"Flutter Theming: Light and Dark Theme with Custom Color"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">Flutter framework is well known for its efficient and easy-to-use theming system that allows developers to create beautiful, consistent user interfaces with minimal effort. In this blog post, we will focus on how to create a light and dark theme with custom colors in Flutter.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Theming is a critical aspect of app design, as it provides users with a consistent look and feel across the entire application. With<\/span> <span style=\"font-weight: 400;\">Flutter app development services, theming is a breeze, and developers can create custom mobile app themes that match their branding guidelines or suit their users&#8217; preferences.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">In this tutorial, we will demonstrate how to create a light and dark theme with custom colors and how to switch between them dynamically. We will also explore how to define custom colors and how to use them in your themes. So, let&#8217;s get started!<\/span><\/p>\n<p><span style=\"font-weight: 400;\">But before we start the adventure, let\u2019s read about<\/span><a href=\"https:\/\/dianapps.com\/blog\/from-zero-to-flutter-hero-a-beginners-guide-to-app-development\/\"><span style=\"font-weight: 400;\"> from zero to become a hero<\/span><\/a><span style=\"font-weight: 400;\"> in creating dedicated Flutter theming in your app.\u00a0<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"What-is-Flutter-Theming\"><\/span><span style=\"font-weight: 400;\">What is Flutter Theming?<\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Flutter theming refers to the process of customizing the visual appearance of a Flutter application. With theming, you can define a set of colors, typography, and other visual attributes that are consistent throughout your app development solutions. This makes it easier to maintain a consistent look and feel across your application and allows you to easily change the appearance of your app by modifying the theme.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">In Flutter, you can define a theme using the ThemeData class, which allows you to specify properties such as the background color, primary and accent colors, text styles, and more. Once you have defined a theme, you can apply it to your entire app or to specific widgets using the Theme widget. But hey! Do you know what\u2019s better? Making <\/span><a href=\"https:\/\/dianapps.com\/blog\/what-makes-flutter-ideal-for-the-mvp-development-process\/\"><span style=\"font-weight: 400;\">flutter ideal for the MVP development<\/span><\/a><span style=\"font-weight: 400;\"> process.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Flutter also provides a number of built-in themes that you can use as a starting point for your own custom themes. These include the MaterialApp and CupertinoApp widgets, which provide pre-defined themes that mimic the look and feel of Material Design and <\/span><a href=\"https:\/\/dianapps.com\/ios-app-development\"><b>iOS app development<\/b><\/a> <span style=\"font-weight: 400;\">respectively.<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Step-By-Step-Guide-on-Creating-Light-and-Dark-Theme-With-Custom-Colors-in-Flutter\"><\/span><span style=\"font-weight: 400;\">Step-By-Step Guide on Creating Light and Dark Theme With Custom Colors in Flutter<\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Let&#8217;s dive into the details of creating a light and dark theme with custom colors in Flutter.<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Step-1-Defining-Custom-Colors\"><\/span><span style=\"font-weight: 400;\">Step-1: Defining Custom Colors<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">As mentioned in the introduction, we first need to define our custom colors before creating our themes. The Color class in Flutter app development provides several ways to define colors, such as using RGB or HEX values. In this example, we will create a separate file called colors.dart and define our custom colors as constants.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Here is an example of how to define custom colors in <\/span><b>colors.dart<\/b><span style=\"font-weight: 400;\">:<\/span><\/p>\n<pre class=\"height-set:true height:250 nums:false lang:default decode:true \">import 'package:flutter\/material.dart';\r\n\r\nconst Color primaryColor = Color(0xFF3D4EB8);\r\n\r\nconst Color secondaryColor = Color(0xFFEEF2FE);\r\n\r\nconst Color accentColor = Color(0xFFFFC107);<\/pre>\n<p><span style=\"font-weight: 400;\">In this example, we have defined three custom colors:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>primaryColor: <\/b><span style=\"font-weight: 400;\">This color is used as the primary color for our application, such as the color of the app bar and the primary button.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>secondaryColor: <\/b><span style=\"font-weight: 400;\">This color is used as the background color for our application, such as the color of the scaffold and the body.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>accentColor:<\/b><span style=\"font-weight: 400;\"> This color is used as the accent color for our application, such as the color of the floating action button and the selected item in a list.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Note that you can define as many custom colors as you need, depending on your design requirements.<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Step-2-Creating-Themes\"><\/span><span style=\"font-weight: 400;\">Step-2: Creating Themes<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Once we have defined our custom colors, we can create our light and dark themes using the ThemeData class. The ThemeData class provides various properties for different theme elements, such as primaryColor, accentColor, scaffoldBackgroundColor, textTheme, and many more. You can set these properties to your custom colors to create a consistent look and feel across your <\/span><a href=\"https:\/\/dianapps.com\/\"><b>mobile app development<\/b><\/a><span style=\"font-weight: 400;\"> facet.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Here is an example of how to create a light theme:<\/span><\/p>\n<pre class=\"height-set:true height:250 nums:false lang:default decode:true \">final ThemeData lightTheme = ThemeData(\r\n\r\n\u00a0\u00a0primaryColor: primaryColor,\r\n\r\n\u00a0\u00a0accentColor: accentColor,\r\n\r\n\u00a0\u00a0scaffoldBackgroundColor: Colors.white,\r\n\r\n\u00a0\u00a0backgroundColor: secondaryColor,\r\n\r\n\u00a0\u00a0textTheme: TextTheme(\r\n\r\n\u00a0\u00a0\u00a0\u00a0headline6: TextStyle(\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0color: Colors.black,\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0fontWeight: FontWeight.bold,\r\n\r\n\u00a0\u00a0\u00a0\u00a0),\r\n\r\n\u00a0\u00a0\u00a0\u00a0bodyText2: TextStyle(\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0color: Colors.black87,\r\n\r\n\u00a0\u00a0\u00a0\u00a0),\r\n\r\n\u00a0\u00a0),\r\n\r\n);<\/pre>\n<p><span style=\"font-weight: 400;\">In this example, we have set the primaryColor and accentColor properties to our custom colors, and we have also set the background colors and text colors for different parts of our application. Specifically:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>primaryColor:<\/b><span style=\"font-weight: 400;\"> This is set to our custom primaryColor.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>accentColor:<\/b><span style=\"font-weight: 400;\"> This is set to our custom accentColor.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>scaffoldBackgroundColor:<\/b><span style=\"font-weight: 400;\"> This is set to Colors.white, which means that the background color of our scaffold (i.e., the background color of our app) will be white.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>backgroundColor:<\/b><span style=\"font-weight: 400;\"> This is set to our custom secondaryColor, which means that the background color of the body of our app will be secondaryColor.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>textTheme:<\/b><span style=\"font-weight: 400;\"> This is used to define the text styles for different types of text in our app. In this example, we have set the text color for headline6 to black and the text color for bodyText2 to black87. Note that you can customize the text styles further by setting other properties of the TextStyle class.<\/span><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">Similarly, here is an example of how to create a dark theme:<\/span><\/p>\n<pre class=\"height-set:true height:250 nums:false lang:default decode:true\">final ThemeData darkTheme = ThemeData(\r\n\r\n\u00a0\u00a0primaryColor: primaryColor,\r\n\r\n\u00a0\u00a0accentColor: accentColor,\r\n\r\n\u00a0\u00a0scaffoldBackgroundColor: Colors.black,\r\n\r\n\u00a0\u00a0backgroundColor: Colors.grey[900],\r\n\r\n\u00a0\u00a0textTheme: TextTheme(\r\n\r\n\u00a0\u00a0\u00a0\u00a0headline6: TextStyle(\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0color: Colors.white,\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0fontWeight: FontWeight.bold,\r\n\r\n\u00a0\u00a0\u00a0\u00a0),\r\n\r\n\u00a0\u00a0\u00a0\u00a0bodyText2: TextStyle(\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0color: Colors.white70,\r\n\r\n\u00a0\u00a0\u00a0\u00a0),\r\n\r\n\u00a0\u00a0),\r\n\r\n);<\/pre>\n<p><span style=\"font-weight: 400;\">In this example, we have set the same properties as our light theme, but with different color values that are more suitable for a dark theme.<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Step-3-Switching-Themes\"><\/span><span style=\"font-weight: 400;\">Step-3: Switching Themes<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Now that we have created our light and dark themes, we need to provide a way for users to switch between them. By hiring a<\/span> <a href=\"https:\/\/dianapps.com\/flutter-app-development\"><b>Flutter app development company<\/b><\/a><span style=\"font-weight: 400;\">, we can easily switch between themes by wrapping our MaterialApp widget in a Theme widget and setting the data property to our selected theme.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Although switching themes seems like a one-person job, it\u2019s not apparently! Head on and read out the<\/span><a href=\"https:\/\/dianapps.com\/blog\/top-flutter-app-development-companies-and-developers\/\"><span style=\"font-weight: 400;\"> top Flutter development companies and developers<\/span><\/a><span style=\"font-weight: 400;\"> to choose one perfect and suitable for your company.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Here is an example of how to switch between light and dark themes:<\/span><\/p>\n<pre class=\"height-set:true height:250 nums:false lang:default decode:true \">class MyApp extends StatefulWidget {\r\n\r\n\u00a0\u00a0@override\r\n\r\n\u00a0\u00a0_MyAppState createState() =&gt; _MyAppState();\r\n\r\n}\r\n\r\n\r\nclass _MyAppState extends State&lt;MyApp&gt; {\r\n\r\n\u00a0\u00a0bool _isDarkModeEnabled = false;\r\n\r\n\r\n\r\n\r\n\u00a0\u00a0void _toggleDarkMode() {\r\n\r\n\u00a0\u00a0\u00a0\u00a0setState(() {\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0_isDarkModeEnabled = !_isDarkModeEnabled;\r\n\r\n\u00a0\u00a0\u00a0\u00a0});\r\n\r\n\u00a0\u00a0}\r\n\r\n\u00a0\u00a0@override\r\n\r\n\u00a0\u00a0Widget build(BuildContext context) {\r\n\r\n\u00a0\u00a0\u00a0\u00a0final theme = _isDarkModeEnabled ? darkTheme : lightTheme;\r\n\r\n\u00a0\u00a0\u00a0\u00a0return MaterialApp(\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0title: 'My App',\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0theme: theme,\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0home: Scaffold(\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0appBar: AppBar(\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0title: Text('My App'),\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0),\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0body: Center(\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0child: Text(\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'Hello, world!',\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0style: Theme.of(context).textTheme.headline6,\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0),\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0),\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0floatingActionButton: FloatingActionButton(\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0onPressed: _toggleDarkMode,\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0child: Icon(Icons.lightbulb),\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0),\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0),\r\n\r\n\u00a0\u00a0\u00a0\u00a0);\r\n\r\n\u00a0\u00a0}\r\n\r\n}<\/pre>\n<p><span style=\"font-weight: 400;\">In this example, we have created a MyApp widget that contains a boolean _isDarkModeEnabled that toggles between light and dark modes. We then use the ternary operator to set the theme property of our MaterialApp widget to either lightTheme or darkTheme, depending on the value of _isDarkModeEnabled.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">We have also added a FloatingActionButton that toggles the value of _isDarkModeEnabled when pressed. When the value of _isDarkModeEnabled changes, the build method is called, which rebuilds our app with the new theme.<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"How-DianApps-Can-Assist-In-Designing-Flutter-Light-Dark-Theme-With-Custom-Colors\"><\/span><span style=\"font-weight: 400;\">How DianApps Can Assist In Designing Flutter Light &amp; Dark Theme With Custom Colors?<\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">With years of experience in delivering Flutter app development services, DianApps\u2019 team can seamlessly create customized Flutter light &amp; dark theme applications by utilizing their expertise in technology and mobile app development.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Here\u2019s how they started working on the project:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Firstly, the team can work with you to identify your custom color palette and understand your design requirements. They can then define the custom colors and create the light and dark themes that fit your design specifications.<\/span><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Additionally, the team can provide guidance on how to implement theme switching in your app, ensuring a smooth transition between the two themes. They can also assist in creating custom widgets that are consistent with your selected themes.<\/span><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">DianApps team has extensive experience in creating custom themes in Flutter, and they can help you create a visually appealing and cohesive user interface for your app development. Their focus on delivering high-quality, user-friendly solutions ensures that your app looks great and functions flawlessly across all devices and platforms.<\/span><\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Wrapping-Up\"><\/span><span style=\"font-weight: 400;\">Wrapping Up<\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Theming is an important aspect of creating a visually appealing and consistent user interface in Flutter. By defining custom colors and creating light and dark themes, you can ensure that your app has a cohesive design that is both attractive and functional. Flutter&#8217;s built-in Theme widget makes it easy to switch between themes and customize properties such as text styles, background colors, and more.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Creating custom themes in Flutter may require some expertise in Flutter development. If you need assistance in creating custom themes, you can rely on our expertise in Flutter development services. Being a top <\/span><a href=\"https:\/\/dianapps.com\/flutter-app-development\"><b>Flutter app development company in the USA<\/b><\/a><span style=\"font-weight: 400;\"> team of experienced developers can help you create custom light and dark themes with custom colors seamlessly, ensuring that your app looks and functions flawlessly across all devices and platforms.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">With this step-by-step guide, you can <\/span><a href=\"https:\/\/dianapps.com\/blog\/creating-stunning-ui-designs-with-flutter-tips-and-tricks-from-experts\/\"><span style=\"font-weight: 400;\">create a stunning user interface<\/span><\/a><span style=\"font-weight: 400;\"> that enhances your app&#8217;s overall user experience.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Flutter framework is well known for its efficient and easy-to-use theming system that allows developers to create beautiful, consistent user interfaces with minimal effort. In this blog post, we will focus on how to create a light and dark theme with custom colors in Flutter. Theming is a critical aspect of app design, as it [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":6554,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_wp_applaud_exclude":false,"footnotes":""},"categories":[3],"tags":[239,123,58,67],"class_list":["post-6551","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-app-development","tag-best-flutter-developers-company","tag-flutter","tag-flutter-app-development","tag-mobile-app-development-company"],"featured_image_src":{"landsacpe":["https:\/\/dianapps.com\/blog\/wp-content\/uploads\/2023\/06\/Flutter-Theming-1140x445.png",1140,445,true],"list":["https:\/\/dianapps.com\/blog\/wp-content\/uploads\/2023\/06\/Flutter-Theming-463x348.png",463,348,true],"medium":["https:\/\/dianapps.com\/blog\/wp-content\/uploads\/2023\/06\/Flutter-Theming-300x169.png",300,169,true],"full":["https:\/\/dianapps.com\/blog\/wp-content\/uploads\/2023\/06\/Flutter-Theming.png",1536,864,false]},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.12 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Flutter Theming: Light and Dark Theme with Custom Color<\/title>\n<meta name=\"description\" content=\"Learn how to create light and dark themes with custom colors in flutter. This blog may help you get started at ease.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/dianapps.com\/blog\/flutter-theming-light-and-dark-theme-with-custom-color\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Flutter Theming: Light and Dark Theme with Custom Color\" \/>\n<meta property=\"og:description\" content=\"Learn how to create light and dark themes with custom colors in flutter. This blog may help you get started at ease.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dianapps.com\/blog\/flutter-theming-light-and-dark-theme-with-custom-color\/\" \/>\n<meta property=\"og:site_name\" content=\"Learn About Digital Transformation &amp; Development | DianApps Blog\" \/>\n<meta property=\"article:published_time\" content=\"2023-06-30T08:44:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/dianapps.com\/blog\/wp-content\/uploads\/2023\/06\/Flutter-Theming.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1536\" \/>\n\t<meta property=\"og:image:height\" content=\"864\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Vikash Soni\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Vikash Soni\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Flutter Theming: Light and Dark Theme with Custom Color","description":"Learn how to create light and dark themes with custom colors in flutter. This blog may help you get started at ease.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/dianapps.com\/blog\/flutter-theming-light-and-dark-theme-with-custom-color\/","og_locale":"en_US","og_type":"article","og_title":"Flutter Theming: Light and Dark Theme with Custom Color","og_description":"Learn how to create light and dark themes with custom colors in flutter. This blog may help you get started at ease.","og_url":"https:\/\/dianapps.com\/blog\/flutter-theming-light-and-dark-theme-with-custom-color\/","og_site_name":"Learn About Digital Transformation &amp; Development | DianApps Blog","article_published_time":"2023-06-30T08:44:06+00:00","og_image":[{"width":1536,"height":864,"url":"https:\/\/dianapps.com\/blog\/wp-content\/uploads\/2023\/06\/Flutter-Theming.png","type":"image\/png"}],"author":"Vikash Soni","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Vikash Soni","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/dianapps.com\/blog\/flutter-theming-light-and-dark-theme-with-custom-color\/","url":"https:\/\/dianapps.com\/blog\/flutter-theming-light-and-dark-theme-with-custom-color\/","name":"Flutter Theming: Light and Dark Theme with Custom Color","isPartOf":{"@id":"https:\/\/dianapps.com\/blog\/#website"},"datePublished":"2023-06-30T08:44:06+00:00","dateModified":"2023-06-30T08:44:06+00:00","author":{"@id":"https:\/\/dianapps.com\/blog\/#\/schema\/person\/0126fafc83e42bece2acbfe92f7d0f4f"},"description":"Learn how to create light and dark themes with custom colors in flutter. This blog may help you get started at ease.","breadcrumb":{"@id":"https:\/\/dianapps.com\/blog\/flutter-theming-light-and-dark-theme-with-custom-color\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dianapps.com\/blog\/flutter-theming-light-and-dark-theme-with-custom-color\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/dianapps.com\/blog\/flutter-theming-light-and-dark-theme-with-custom-color\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dianapps.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Flutter Theming: Light and Dark Theme with Custom Color"}]},{"@type":"WebSite","@id":"https:\/\/dianapps.com\/blog\/#website","url":"https:\/\/dianapps.com\/blog\/","name":"Learn About Digital Transformation &amp; Development | DianApps Blog","description":"Dianapps","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/dianapps.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/dianapps.com\/blog\/#\/schema\/person\/0126fafc83e42bece2acbfe92f7d0f4f","name":"Vikash Soni","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dianapps.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/dianapps.com\/blog\/wp-content\/uploads\/2022\/07\/cropped-vikash-96x96.png","contentUrl":"https:\/\/dianapps.com\/blog\/wp-content\/uploads\/2022\/07\/cropped-vikash-96x96.png","caption":"Vikash Soni"},"description":"Vikash Soni, the visionary CEO and Co-founder of DianApps. With his profound expertise in Android and iOS app development, he leads the team to deliver top-notch solutions to clients worldwide. Under his guidance, the company has achieved remarkable success, earning a reputation as a leading web and mobile app development company.","sameAs":["https:\/\/www.linkedin.com\/in\/vikash-soni-59726530\/"],"url":"https:\/\/dianapps.com\/blog\/author\/infodianapps-com\/"}]}},"_links":{"self":[{"href":"https:\/\/dianapps.com\/blog\/wp-json\/wp\/v2\/posts\/6551","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dianapps.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dianapps.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dianapps.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dianapps.com\/blog\/wp-json\/wp\/v2\/comments?post=6551"}],"version-history":[{"count":1,"href":"https:\/\/dianapps.com\/blog\/wp-json\/wp\/v2\/posts\/6551\/revisions"}],"predecessor-version":[{"id":6553,"href":"https:\/\/dianapps.com\/blog\/wp-json\/wp\/v2\/posts\/6551\/revisions\/6553"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dianapps.com\/blog\/wp-json\/wp\/v2\/media\/6554"}],"wp:attachment":[{"href":"https:\/\/dianapps.com\/blog\/wp-json\/wp\/v2\/media?parent=6551"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dianapps.com\/blog\/wp-json\/wp\/v2\/categories?post=6551"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dianapps.com\/blog\/wp-json\/wp\/v2\/tags?post=6551"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}