<?xml version="1.0" encoding="UTF-8" standalone="no"?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0"><channel><title>Project Codes</title><description></description><managingEditor>noreply@blogger.com (Sunni Kumar)</managingEditor><pubDate>Wed, 18 Dec 2024 19:17:34 -0800</pubDate><generator>Blogger http://www.blogger.com</generator><openSearch:totalResults xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">2</openSearch:totalResults><openSearch:startIndex xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">1</openSearch:startIndex><openSearch:itemsPerPage xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">3</openSearch:itemsPerPage><link>http://projects-codes.blogspot.com/</link><language>en-us</language><itunes:explicit>no</itunes:explicit><copyright>2013 Copyright By www.projects-codes.blogspot.in</copyright><itunes:keywords>java,php,php,programing,learn,java,learn,php,php,tutorial,java,tutorial,project,projects,on,java,projects,on,php,project,code,of,php,project,code,of,java,c,programms,c,programming,c,tutorial,java,programs,php,programs</itunes:keywords><itunes:summary>This website is about to share project codes and to help or solve the problems of all learners in programming. Here you can get different programming languages program codes to learn more and different things. Languages you can learn here like Java, C, PHP.</itunes:summary><itunes:subtitle>Project Codes Learn &amp;amp; Share - Java, PHP, C, Networking, Programming Books, Books, Programming Tools, IDE Tools</itunes:subtitle><itunes:category text="Education"><itunes:category text="Educational Technology"/></itunes:category><itunes:author>www.projects-codes.blogspot.in</itunes:author><itunes:owner><itunes:email>sunnikmr8@gmail.com</itunes:email><itunes:name>www.projects-codes.blogspot.in</itunes:name></itunes:owner><item><title>Fix Blank Screen issue on app start by  Splash Screen</title><link>http://projects-codes.blogspot.com/2023/01/fix-blank-screen-issue-on-app-start-by.html</link><pubDate>Mon, 16 Jan 2023 23:51:00 -0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6452986121841458587.post-8818606339696018636</guid><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h1 class="PostHeading_title__3M2Vb" style="box-sizing: border-box; color: #2a294e; font-family: Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 42px; font-weight: 500; line-height: 54px; margin: 32px 0px 0px;"&gt;Flutter - Splash Screen for Android and iOS&lt;/h1&gt;&lt;div&gt;&lt;span style="color: #02294e; font-family: Roboto, sans-serif; font-size: 32px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color: #02294e; font-family: Roboto, sans-serif; font-size: 32px;"&gt;What is Splash Screen?&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;p style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; margin: 24px 0px;"&gt;Splash Screen (or Launch Screen on iOS) is the very first page of your app seen by users. So it would be great to make a good first impression. I would like to present you a few ways to create a splash screen in your Flutter application using native solutions or Flutter package. Our goal is to create splash screens as shown below (from left: iOS 15, Android 12, Android 8):&lt;/p&gt;&lt;/div&gt;&lt;div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMX76U7AZ2WXDfw2oD7G8vlFRaIcOSDjTl-KZatXcSCjTOnkqr69syvM11iEpMTQMUw8esIZVYunEd1OHqmEhES50HUevVJNuNTzvobjLLwbhDAoSdDnV5y9cpyRB-jzlVpI-R67oKTxOueecJltVIEUH_lcMcIl9fUwAmbGDBG84PIlwFI5x0XZDizw/s2280/Android_8_3b6a6b4106.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="2280" data-original-width="1080" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMX76U7AZ2WXDfw2oD7G8vlFRaIcOSDjTl-KZatXcSCjTOnkqr69syvM11iEpMTQMUw8esIZVYunEd1OHqmEhES50HUevVJNuNTzvobjLLwbhDAoSdDnV5y9cpyRB-jzlVpI-R67oKTxOueecJltVIEUH_lcMcIl9fUwAmbGDBG84PIlwFI5x0XZDizw/s320/Android_8_3b6a6b4106.gif" width="152" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkHgbyvC6cC3fukGLZRco-1Z_8yS8OweI-DZkqLjriyyy_cEGGpHhhELC9skv4HJkpFEPxlK0D_1mPB1mMfoovRK1dH6UO8XtF45L1EbpT5ZjN9ywGocR6WzKJawIIfJLGVkrRmdywQ5jdKmDshTGNyQ1pmuYGy2xWUCBbdpgmuCxGEeMm_XbVhoBFVA/s2280/Android_12_362aeae2fa.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="2280" data-original-width="1080" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkHgbyvC6cC3fukGLZRco-1Z_8yS8OweI-DZkqLjriyyy_cEGGpHhhELC9skv4HJkpFEPxlK0D_1mPB1mMfoovRK1dH6UO8XtF45L1EbpT5ZjN9ywGocR6WzKJawIIfJLGVkrRmdywQ5jdKmDshTGNyQ1pmuYGy2xWUCBbdpgmuCxGEeMm_XbVhoBFVA/s320/Android_12_362aeae2fa.gif" width="152" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxq5aoBGGjU9M3HEGsPeZFkFJp9XLTOcwQRugK1E3HK5HF5vIHHciYuTM_51nh-4hjk6iUEy_zcGYzX_vxAezctoirpeV_9bybqdewW3zS_OPXRMJmMKI85CqduI_A2MfVR9y_hKjT3nz740lYCo2kjscB3Odh8qPmLsZFL1hAFQy77QwC38GMJ67oyQ/s1300/i_OS_15_5f5c1c6044.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="1300" data-original-width="600" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxq5aoBGGjU9M3HEGsPeZFkFJp9XLTOcwQRugK1E3HK5HF5vIHHciYuTM_51nh-4hjk6iUEy_zcGYzX_vxAezctoirpeV_9bybqdewW3zS_OPXRMJmMKI85CqduI_A2MfVR9y_hKjT3nz740lYCo2kjscB3Odh8qPmLsZFL1hAFQy77QwC38GMJ67oyQ/s320/i_OS_15_5f5c1c6044.gif" width="148" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; margin: 24px 0px;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style="box-sizing: border-box; color: #02294e; font-family: Roboto, sans-serif; font-size: 32px; font-weight: 500; line-height: 36px; margin: 56px 0px 0px;"&gt;iOS&lt;/h2&gt;&lt;h3 style="box-sizing: border-box; color: #02294e; font-family: Roboto, sans-serif; font-size: 24px; font-weight: 500; line-height: 36px; margin: 24px 0px 0px;"&gt;Launch Screen using Storyboard&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;&lt;p style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; margin: 24px 0px;"&gt;We are able to set a splash screen for iOS in two ways. The first one is by using Storyboard.&lt;/p&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;1.&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;First of all, we need to open our project in Xcode. Being in the main directory of the project, we can do that using&amp;nbsp;&lt;/span&gt;&lt;code style="background-color: #f9f4f0; border-radius: 2px; box-sizing: border-box; color: #af0000; font-family: monospace, monospace; font-size: 14.4px; margin-bottom: 0px; margin-top: 0px; padding: 2px 4px;"&gt;open ios/Runner.xcworkspace&lt;/code&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;command.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Lora, serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;2.&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Then, we need to add AssetImage, which is going to be our icon on the splash screen. As you can see in the image below, we need to provide 3 different resolutions of an icon: 1x, 2x and 3x (more details&lt;/span&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://developer.apple.com/design/human-interface-guidelines/ios/icons-and-images/image-size-and-resolution/" rel="nofollow noopener noreferrer" style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; margin-bottom: 0px; margin-top: 0px;" target="_blank"&gt;here&lt;/a&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;ol style="box-sizing: border-box; counter-reset: ordered 0; font-family: Lora, serif; font-size: 16px; list-style: none; margin: 24px 0px; padding-left: 24px; text-align: left;"&gt;&lt;li style="box-sizing: border-box; counter-increment: ordered 1; position: relative;"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgphukR5MXTCTDDZ4C2SBWe83Cv4Man8E5V1p1EsExlXknXs5EluOT0sdGi_2XJzQwemwNtckHtCa5iSE-1v6pdxMZj--gaMvPtAkgIhJmkbgRwTVSKNYaR4746jPdPF2NMraSO7j65jtxd6L9jbFluFdRxH-NvRFejLY1XrC7DJyMV4g-hYN3FpSZaSw/s2560/Assets_Launch_Image_8e9fc1172a.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="1440" data-original-width="2560" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgphukR5MXTCTDDZ4C2SBWe83Cv4Man8E5V1p1EsExlXknXs5EluOT0sdGi_2XJzQwemwNtckHtCa5iSE-1v6pdxMZj--gaMvPtAkgIhJmkbgRwTVSKNYaR4746jPdPF2NMraSO7j65jtxd6L9jbFluFdRxH-NvRFejLY1XrC7DJyMV4g-hYN3FpSZaSw/w320-h180/Assets_Launch_Image_8e9fc1172a.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;3.&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Then, we need to set a background color in&amp;nbsp;&lt;/span&gt;&lt;span style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; font-weight: bolder; margin-bottom: 0px; margin-top: 0px;"&gt;LaunchScreen.storyboard&lt;/span&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&amp;nbsp;as in the image below.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizRHW5GTuRWGhPJkcdiZCBPa676tXnpR1QlihcLAbuDZAhp010H9c7cIthx1SfTmCfMFUo3b8rrS0Odz44OrEJdFUqlM7Zq-wl4TewwGyrMLVMnKi_WCBbjd0GHW57sTK4G2sXvHxGVdFXdkESLF2Ea2rROTl77N7caNpuo1qYjTbxNJWlc7nsqqHxKw/s2560/Launch_Screen_Storyboard_f1bb81f5c4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="1440" data-original-width="2560" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizRHW5GTuRWGhPJkcdiZCBPa676tXnpR1QlihcLAbuDZAhp010H9c7cIthx1SfTmCfMFUo3b8rrS0Odz44OrEJdFUqlM7Zq-wl4TewwGyrMLVMnKi_WCBbjd0GHW57sTK4G2sXvHxGVdFXdkESLF2Ea2rROTl77N7caNpuo1qYjTbxNJWlc7nsqqHxKw/s320/Launch_Screen_Storyboard_f1bb81f5c4.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;4.&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;That is all. Our splash screen should appear after building the app.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; font-weight: bolder;"&gt;TIP 1&lt;/span&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;: If you can’t see changes to your splash screen, try to delete the app from the phone/simulator, restart the phone/simulator, go to Xcode→Product→Clean Build Folder. That should solve the issue.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;h3 style="box-sizing: border-box; color: #02294e; font-family: Roboto, sans-serif; font-size: 24px; font-weight: 500; line-height: 36px; margin: 24px 0px 0px;"&gt;Launch Screen using Info.plist&lt;/h3&gt;&lt;p style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; margin: 24px 0px;"&gt;The second approach uses&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;Info.plist&lt;/span&gt;&amp;nbsp;file (Information Property List).&lt;/p&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;1.&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;R&lt;/span&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;emove&amp;nbsp;&lt;/span&gt;&lt;span style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; font-weight: bolder; margin-bottom: 0px; margin-top: 0px;"&gt;LaunchScreen.storyboard&lt;/span&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&amp;nbsp;file using Xcode (it is important to use Xcode to remove all dependencies to that file).&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghEKLTFNVeR89cRWofSQgWXzlywQ-Hpm8tDK6dxja-PZ32q5GVgnnW9tKnX4HUUNDOVS0qtPeA2cb3_AQ_PZl5GrYAZC8zwCcN3DotM91ryPiB2cmakLtrHJIAQbCfGRba7_3v2z08bKp1X48umnPCljGUZ3uPfFCaI74po4T8Z06DY-rq5Vx07k-tQA/s966/Xcode_remove_storyboard_67a17f0aea.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="431" data-original-width="966" height="143" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghEKLTFNVeR89cRWofSQgWXzlywQ-Hpm8tDK6dxja-PZ32q5GVgnnW9tKnX4HUUNDOVS0qtPeA2cb3_AQ_PZl5GrYAZC8zwCcN3DotM91ryPiB2cmakLtrHJIAQbCfGRba7_3v2z08bKp1X48umnPCljGUZ3uPfFCaI74po4T8Z06DY-rq5Vx07k-tQA/s320/Xcode_remove_storyboard_67a17f0aea.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;2.&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Then, add&amp;nbsp;&lt;/span&gt;&lt;span style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; font-weight: bolder; margin-bottom: 0px; margin-top: 0px;"&gt;New Color Set&lt;/span&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&amp;nbsp;inside&amp;nbsp;&lt;/span&gt;&lt;span style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; font-weight: bolder; margin-bottom: 0px; margin-top: 0px;"&gt;Assets.xcassets&lt;/span&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;. We are able to define different colors for light and dark themes.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOgGA_DLVELC3QBlNXABs1K0OQpw3kGy-FqgO7Bmwc7IuYE4R_R6m5cW5SaZxgHz1hY99mqMr9Kl5ZvMsjBv7de4ei0oU9JTb8QJ-O5KsDe6c8WvXaKw_FBSvCW7jS62ehAKByubpU3-hzWxbOVkzsvpPaQF5JZFtgkHpziU5TIHdSZGkSlZkx7w_Oaw/s771/Xcode_new_color_set_f845df3af9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="714" data-original-width="771" height="296" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOgGA_DLVELC3QBlNXABs1K0OQpw3kGy-FqgO7Bmwc7IuYE4R_R6m5cW5SaZxgHz1hY99mqMr9Kl5ZvMsjBv7de4ei0oU9JTb8QJ-O5KsDe6c8WvXaKw_FBSvCW7jS62ehAKByubpU3-hzWxbOVkzsvpPaQF5JZFtgkHpziU5TIHdSZGkSlZkx7w_Oaw/s320/Xcode_new_color_set_f845df3af9.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&lt;div&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;3.&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Add&amp;nbsp;&lt;/span&gt;&lt;span style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; font-weight: bolder; margin-bottom: 0px; margin-top: 0px;"&gt;AssetImage&lt;/span&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&amp;nbsp;as in the 2nd step for Storyboard.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;4.&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Next, we have to remove information about using the storyboard as our splash screen in&amp;nbsp;&lt;/span&gt;&lt;span style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; font-weight: bolder; margin-bottom: 0px; margin-top: 0px;"&gt;Info.plist&lt;/span&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&amp;nbsp;file. To do that, delete the “&lt;/span&gt;&lt;span style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; font-weight: bolder; margin-bottom: 0px; margin-top: 0px;"&gt;Launch screen interface file base name&lt;/span&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;” key.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEij3V7zkeb1jrv2QsAcn98ubQgIJPxhi_tvO1pgI2LaTDwjSn6ndpCPVJfcVcerjI75n4R1q2-nM9qW0WurtHcFkzKZYNZRTPcuZ47BOh_CjYBZZv3pgeQOF8S1R3eGLJqXi6aWJpsXDf2KY7u4PggsD-1x_Zp7AU1Ey6_Fpg9hTcNE9Khxg5n8n9w9yA/s966/Xcode_remove_storyboard_67a17f0aea.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="431" data-original-width="966" height="143" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEij3V7zkeb1jrv2QsAcn98ubQgIJPxhi_tvO1pgI2LaTDwjSn6ndpCPVJfcVcerjI75n4R1q2-nM9qW0WurtHcFkzKZYNZRTPcuZ47BOh_CjYBZZv3pgeQOF8S1R3eGLJqXi6aWJpsXDf2KY7u4PggsD-1x_Zp7AU1Ey6_Fpg9hTcNE9Khxg5n8n9w9yA/s320/Xcode_remove_storyboard_67a17f0aea.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;5.&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;And then set the appearance of our new splash screen using “&lt;/span&gt;&lt;span style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; font-weight: bolder; margin-bottom: 0px; margin-top: 0px;"&gt;Launch Screen&lt;/span&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;” key. “&lt;/span&gt;&lt;span style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; font-weight: bolder; margin-bottom: 0px; margin-top: 0px;"&gt;LaunchBackgroundColor&lt;/span&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;” and “&lt;/span&gt;&lt;span style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; font-weight: bolder; margin-bottom: 0px; margin-top: 0px;"&gt;LaunchImage&lt;/span&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;” are assets added in a previous steps.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihgRqv6pECKEtY_KPRkHq9x2amKvKMLCGBBSRKn6HRAYYauR8w0OGKnfQQBR7M7L9bMBjRP_OAA6J1yShfElHTcSxpqRJ3eEpxxe4_SRcIx2P5iD4vmIBIQUE5QEYWhKiGKA02Qyjc3M72mgdnauLSDC_lWtv7r8Vp_SHk9uDEFVwNjOA9nv1NYcBX9Q/s1095/Xcode_info_plist_add_Launch_Screen_4fbf5467e3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="533" data-original-width="1095" height="156" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihgRqv6pECKEtY_KPRkHq9x2amKvKMLCGBBSRKn6HRAYYauR8w0OGKnfQQBR7M7L9bMBjRP_OAA6J1yShfElHTcSxpqRJ3eEpxxe4_SRcIx2P5iD4vmIBIQUE5QEYWhKiGKA02Qyjc3M72mgdnauLSDC_lWtv7r8Vp_SHk9uDEFVwNjOA9nv1NYcBX9Q/s320/Xcode_info_plist_add_Launch_Screen_4fbf5467e3.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;6.&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Done. Run the app… and, unfortunately, we can notice a black screen between our beautiful splash&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;screen and the first page of the app.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj20uI8LJBAaijvbbnjxAdjEHUa9ziGs9IyP1UVUxQ8uvOtEI4b8L56VJ481gforY7TwWDel1vsw7KzGytnhlG_2c7XBMMDknlN4NyKua9GFp8KxLabK0aomsUGHE-SjPSxUzuZ831a79HHGAdpldL48l25amlDECdU-qKLsmhmCCkkY5KSMgUvtxxevw/s1300/i_OS_15_black_screen_8e525caa4e.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="1300" data-original-width="600" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj20uI8LJBAaijvbbnjxAdjEHUa9ziGs9IyP1UVUxQ8uvOtEI4b8L56VJ481gforY7TwWDel1vsw7KzGytnhlG_2c7XBMMDknlN4NyKua9GFp8KxLabK0aomsUGHE-SjPSxUzuZ831a79HHGAdpldL48l25amlDECdU-qKLsmhmCCkkY5KSMgUvtxxevw/s320/i_OS_15_black_screen_8e525caa4e.gif" width="148" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;h2 style="box-sizing: border-box; color: #02294e; font-family: Roboto, sans-serif; font-size: 32px; font-weight: 500; line-height: 36px; margin: 56px 0px 0px;"&gt;Android Splash Screen&lt;/h2&gt;&lt;p style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; margin: 24px 0px;"&gt;For Android, we also need our icon image in different resolutions for different devices. In this case, place these images in directories called&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;drawable&lt;/span&gt;&amp;nbsp;with different suffixes. If you are not familiar with&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;drawables&lt;/span&gt;, I highly recommend reading&amp;nbsp;&lt;a href="https://developer.android.com/training/multiscreen/screendensities" rel="nofollow noopener noreferrer" style="box-sizing: border-box;" target="_blank"&gt;that&lt;/a&gt;&amp;nbsp;article explaining the topic in detail.&lt;/p&gt;&lt;p style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; margin: 24px 0px;"&gt;To generate all required resolutions of images, I have used the website&amp;nbsp;&lt;a href="https://www.img-bak.in/" rel="nofollow noopener noreferrer" style="box-sizing: border-box;" target="_blank"&gt;https://www.img-bak.in/&lt;/a&gt;&amp;nbsp;(but this one is also cool&amp;nbsp;&lt;a href="http://romannurik.github.io/AndroidAssetStudio/index.html" rel="nofollow noopener noreferrer" style="box-sizing: border-box;" target="_blank"&gt;http://romannurik.github.io/AndroidAssetStudio/index.html&lt;/a&gt;). Remember to provide high-resolution image as an input, e.g. if you want to use an image of 200x200 pixels in your app, you should provide an image of 800x800 pixels because that is the highest resolution used by some Android devices (&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;drawable-xxxhdpi&lt;/span&gt;).&lt;/p&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;1.&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;After generating all required images, place them in appropriate directories in&amp;nbsp;&lt;/span&gt;&lt;code style="background-color: #f9f4f0; border-radius: 2px; box-sizing: border-box; color: #af0000; font-family: monospace, monospace; font-size: 14.4px; margin-bottom: 0px; margin-top: 0px; padding: 2px 4px;"&gt;Android/app/src/main/res&lt;/code&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;2.&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Then, we need to modify the&amp;nbsp;&lt;/span&gt;&lt;code style="background-color: #f9f4f0; border-radius: 2px; box-sizing: border-box; color: #af0000; font-family: monospace, monospace; font-size: 14.4px; margin-bottom: 0px; margin-top: 0px; padding: 2px 4px;"&gt;Android/app/src/main/res/drawable/launch_background.xml&lt;/code&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&amp;nbsp;file. This file will represent the look of our splash screen. If you also have a&amp;nbsp;&lt;/span&gt;&lt;code style="background-color: #f9f4f0; border-radius: 2px; box-sizing: border-box; color: #af0000; font-family: monospace, monospace; font-size: 14.4px; margin-bottom: 0px; margin-top: 0px; padding: 2px 4px;"&gt;drawable-v21&lt;/code&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&amp;nbsp;directory present, which in my case, was generated together with the whole project, you can remove the mentioned directory or place there the same&amp;nbsp;&lt;/span&gt;&lt;code style="background-color: #f9f4f0; border-radius: 2px; box-sizing: border-box; color: #af0000; font-family: monospace, monospace; font-size: 14.4px; margin-bottom: 0px; margin-top: 0px; padding: 2px 4px;"&gt;launch_background.xml&lt;/code&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&amp;nbsp;file as in the&amp;nbsp;&lt;/span&gt;&lt;code style="background-color: #f9f4f0; border-radius: 2px; box-sizing: border-box; color: #af0000; font-family: monospace, monospace; font-size: 14.4px; margin-bottom: 0px; margin-top: 0px; padding: 2px 4px;"&gt;drawable&lt;/code&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&amp;nbsp;directory.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Lora, serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;div style="background-color: #1e1e1e; color: #d4d4d4; font-family: Menlo, Monaco, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12px; line-height: 18px; white-space: pre;"&gt;&lt;div&gt;&lt;span style="color: grey;"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;xml&lt;/span&gt;&lt;span style="color: #9cdcfe;"&gt; version&lt;/span&gt;=&lt;span style="color: #ce9178;"&gt;"1.0"&lt;/span&gt;&lt;span style="color: #9cdcfe;"&gt; encoding&lt;/span&gt;=&lt;span style="color: #ce9178;"&gt;"utf-8"&lt;/span&gt;&lt;span style="color: grey;"&gt;?&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color: #6a9955;"&gt;&amp;lt;!-- Modify this file to customize your launch splash screen --&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color: grey;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;layer-list&lt;/span&gt; &lt;span style="color: #9cdcfe;"&gt;xmlns:android&lt;/span&gt;=&lt;span style="color: #ce9178;"&gt;"http://schemas.android.com/apk/res/android"&lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;    &lt;span style="color: #6a9955;"&gt;&amp;lt;!-- Background color --&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;    &lt;span style="color: grey;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;item&lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;        &lt;span style="color: grey;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;color&lt;/span&gt; &lt;span style="color: #9cdcfe;"&gt;android:color&lt;/span&gt;=&lt;span style="color: #ce9178;"&gt;"#2B2A4E"&lt;/span&gt; &lt;span style="color: grey;"&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;   &lt;span style="color: grey;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;item&lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;    &lt;span style="color: #6a9955;"&gt;&amp;lt;!-- You can insert your own image assets here --&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;    &lt;span style="color: grey;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;item&lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;        &lt;span style="color: grey;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;bitmap&lt;/span&gt;&lt;/div&gt;&lt;div&gt;            &lt;span style="color: #9cdcfe;"&gt;android:gravity&lt;/span&gt;=&lt;span style="color: #ce9178;"&gt;"center"&lt;/span&gt;&lt;/div&gt;&lt;div&gt;            &lt;span style="color: #9cdcfe;"&gt;android:src&lt;/span&gt;=&lt;span style="color: #ce9178;"&gt;"@drawable/logo"&lt;/span&gt; &lt;span style="color: grey;"&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;    &lt;span style="color: grey;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;item&lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color: grey;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;layer-list&lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&lt;div&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;3.&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Next, we have to set our&amp;nbsp;&lt;/span&gt;&lt;code style="background-color: #f9f4f0; border-radius: 2px; box-sizing: border-box; color: #af0000; font-family: monospace, monospace; font-size: 14.4px; margin-bottom: 0px; margin-top: 0px; padding: 2px 4px;"&gt;launch_background.xml&lt;/code&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&amp;nbsp;as a splash screen. To do that, open&amp;nbsp;&lt;/span&gt;&lt;code style="background-color: #f9f4f0; border-radius: 2px; box-sizing: border-box; color: #af0000; font-family: monospace, monospace; font-size: 14.4px; margin-bottom: 0px; margin-top: 0px; padding: 2px 4px;"&gt;Android/app/src/main/res/values/styles.xml&lt;/code&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&amp;nbsp;and under&amp;nbsp;&lt;/span&gt;&lt;code style="background-color: #f9f4f0; border-radius: 2px; box-sizing: border-box; color: #af0000; font-family: monospace, monospace; font-size: 14.4px; margin-bottom: 0px; margin-top: 0px; padding: 2px 4px;"&gt;LaunchTheme&lt;/code&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&amp;nbsp;resource set&amp;nbsp;&lt;/span&gt;&lt;code style="background-color: #f9f4f0; border-radius: 2px; box-sizing: border-box; color: #af0000; font-family: monospace, monospace; font-size: 14.4px; margin-bottom: 0px; margin-top: 0px; padding: 2px 4px;"&gt;android:windowBackground&lt;/code&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&amp;nbsp;as in the snippet below.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Lora, serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;div style="background-color: #1e1e1e; color: #d4d4d4; font-family: Menlo, Monaco, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12px; line-height: 18px; white-space: pre;"&gt;&lt;div&gt;&lt;span style="color: grey;"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;xml&lt;/span&gt;&lt;span style="color: #9cdcfe;"&gt; version&lt;/span&gt;=&lt;span style="color: #ce9178;"&gt;"1.0"&lt;/span&gt;&lt;span style="color: #9cdcfe;"&gt; encoding&lt;/span&gt;=&lt;span style="color: #ce9178;"&gt;"utf-8"&lt;/span&gt;&lt;span style="color: grey;"&gt;?&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color: grey;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;resources&lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;    &lt;span style="color: #6a9955;"&gt;&amp;lt;!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off --&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;    &lt;span style="color: grey;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;style&lt;/span&gt; &lt;span style="color: #9cdcfe;"&gt;name&lt;/span&gt;=&lt;span style="color: #ce9178;"&gt;"LaunchTheme"&lt;/span&gt; &lt;span style="color: #9cdcfe;"&gt;parent&lt;/span&gt;=&lt;span style="color: #ce9178;"&gt;"@android:style/Theme.Light.NoTitleBar"&lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;        &lt;span style="color: #6a9955;"&gt;&amp;lt;!-- Show a splash screen on the activity. Automatically removed when&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color: #6a9955;"&gt;             Flutter draws its first frame --&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;        &lt;span style="color: grey;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;item&lt;/span&gt; &lt;span style="color: #9cdcfe;"&gt;name&lt;/span&gt;=&lt;span style="color: #ce9178;"&gt;"android:windowBackground"&lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;gt;&lt;/span&gt;@drawable/launch_background&lt;span style="color: grey;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;item&lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;    &lt;span style="color: grey;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;style&lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;    &lt;span style="color: #6a9955;"&gt;&amp;lt;!-- Theme applied to the Android Window as soon as the process has started.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color: #6a9955;"&gt;         This theme determines the color of the Android Window while your&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color: #6a9955;"&gt;         Flutter UI initializes, as well as behind your Flutter UI while its&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color: #6a9955;"&gt;         running.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color: #6a9955;"&gt;         This Theme is only used starting with V2 of Flutter's Android embedding. --&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;    &lt;span style="color: grey;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;style&lt;/span&gt; &lt;span style="color: #9cdcfe;"&gt;name&lt;/span&gt;=&lt;span style="color: #ce9178;"&gt;"NormalTheme"&lt;/span&gt; &lt;span style="color: #9cdcfe;"&gt;parent&lt;/span&gt;=&lt;span style="color: #ce9178;"&gt;"@android:style/Theme.Light.NoTitleBar"&lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;        &lt;span style="color: grey;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;item&lt;/span&gt; &lt;span style="color: #9cdcfe;"&gt;name&lt;/span&gt;=&lt;span style="color: #ce9178;"&gt;"android:windowBackground"&lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;gt;&lt;/span&gt;?android:colorBackground&lt;span style="color: grey;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;item&lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;    &lt;span style="color: grey;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;style&lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color: grey;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;resources&lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Lora, serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;If you want to have a different splash screen in dark mode/theme, you have to provide a different file e.g.&lt;/span&gt;&lt;code style="background-color: #f9f4f0; border-radius: 2px; box-sizing: border-box; color: #af0000; font-family: monospace, monospace; font-size: 14.4px; padding: 2px 4px;"&gt;launch_background_dark.xml&lt;/code&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&amp;nbsp;in&amp;nbsp;&lt;/span&gt;&lt;code style="background-color: #f9f4f0; border-radius: 2px; box-sizing: border-box; color: #af0000; font-family: monospace, monospace; font-size: 14.4px; padding: 2px 4px;"&gt;values-night/styles.xml&lt;/code&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;.&lt;/span&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; margin: 24px 0px;"&gt;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;TIP 2&lt;/span&gt;: If you can’t see an icon on your splash screen after building the app, just close the app and open it directly from the device.&lt;/p&gt;&lt;p style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; margin: 24px 0px;"&gt;Now, if we launch the app on Android 11 or lower, we will see our splash screen, however, on Android 12 and higher, it won’t work in the same way. Android 12 brings some big changes to splash screens. The two most important changes are:&lt;/p&gt;&lt;ul style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; list-style: none; margin: 24px 0px; padding-left: 24px;"&gt;&lt;li style="box-sizing: border-box; position: relative;"&gt;the background color must be a single solid color (previously we were able to set any image as a background);&lt;/li&gt;&lt;li style="box-sizing: border-box; position: relative;"&gt;the icon must have specific dimensions and be placed in the center of the screen.&lt;/li&gt;&lt;/ul&gt;&lt;p style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; margin: 24px 0px;"&gt;More information on that&amp;nbsp;&lt;a href="https://developer.android.com/guide/topics/ui/splash-screen" rel="nofollow noopener noreferrer" style="box-sizing: border-box;" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;h3 style="box-sizing: border-box; color: #02294e; font-family: Roboto, sans-serif; font-size: 24px; font-weight: 500; line-height: 36px; margin: 24px 0px 0px;"&gt;Android 12&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdmXFj0XlEpu12RnJYiMFiNphzCeQUJp7h7Fogztj66WD_IFa9J-Vn5VGd1C4bhXwsDjIMVrmOUkVJhxbI6B73w8XnTIYCtrUeHB4eHf3AX4rpRAfyrGaGGumLfuNfK4-nok64Af3MMVFCtqIx_1hrfiaSYTjV3zrYJlyT1YuMM90PwVKXS3h1nfdYbQ/s2280/Android_12_362aeae2fa.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="2280" data-original-width="1080" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdmXFj0XlEpu12RnJYiMFiNphzCeQUJp7h7Fogztj66WD_IFa9J-Vn5VGd1C4bhXwsDjIMVrmOUkVJhxbI6B73w8XnTIYCtrUeHB4eHf3AX4rpRAfyrGaGGumLfuNfK4-nok64Af3MMVFCtqIx_1hrfiaSYTjV3zrYJlyT1YuMM90PwVKXS3h1nfdYbQ/s320/Android_12_362aeae2fa.gif" width="152" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; margin: 24px 0px;"&gt;Ok, so let’s modify our splash screen for Android 12.&lt;/p&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;1.&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Add a new directory named&lt;/span&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;code style="background-color: #f9f4f0; border-radius: 2px; box-sizing: border-box; color: #af0000; font-family: monospace, monospace; font-size: 14.4px; margin-bottom: 0px; margin-top: 0px; padding: 2px 4px;"&gt;values-v31&lt;/code&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;.&lt;/span&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;code style="background-color: #f9f4f0; border-radius: 2px; box-sizing: border-box; color: #af0000; font-family: monospace, monospace; font-size: 14.4px; margin-bottom: 0px; margin-top: 0px; padding: 2px 4px;"&gt;v31&lt;/code&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;means that this directory will be used instead of the sheer&lt;/span&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;code style="background-color: #f9f4f0; border-radius: 2px; box-sizing: border-box; color: #af0000; font-family: monospace, monospace; font-size: 14.4px; margin-bottom: 0px; margin-top: 0px; padding: 2px 4px;"&gt;values&lt;/code&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;directory for all Android devices with SDK 31 and higher. Then, place here&lt;/span&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;code style="background-color: #f9f4f0; border-radius: 2px; box-sizing: border-box; color: #af0000; font-family: monospace, monospace; font-size: 14.4px; margin-bottom: 0px; margin-top: 0px; padding: 2px 4px;"&gt;styles.xml&lt;/code&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;file presented below. Most of the code looks identical to the previous one.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Lora, serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style="background-color: #1e1e1e; color: #d4d4d4; font-family: Menlo, Monaco, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12px; line-height: 18px; white-space: pre;"&gt;&lt;div&gt;&lt;span style="color: grey;"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;xml&lt;/span&gt;&lt;span style="color: #9cdcfe;"&gt; version&lt;/span&gt;=&lt;span style="color: #ce9178;"&gt;"1.0"&lt;/span&gt;&lt;span style="color: #9cdcfe;"&gt; encoding&lt;/span&gt;=&lt;span style="color: #ce9178;"&gt;"utf-8"&lt;/span&gt;&lt;span style="color: grey;"&gt;?&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color: grey;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;resources&lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;    &lt;span style="color: #6a9955;"&gt;&amp;lt;!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off --&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;    &lt;span style="color: grey;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;style&lt;/span&gt; &lt;span style="color: #9cdcfe;"&gt;name&lt;/span&gt;=&lt;span style="color: #ce9178;"&gt;"LaunchTheme"&lt;/span&gt; &lt;span style="color: #9cdcfe;"&gt;parent&lt;/span&gt;=&lt;span style="color: #ce9178;"&gt;"@android:style/Theme.Light.NoTitleBar"&lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;        &lt;span style="color: #6a9955;"&gt;&amp;lt;!-- Show a splash screen on the activity. Automatically removed when&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color: #6a9955;"&gt;             Flutter draws its first frame --&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;        &lt;span style="color: grey;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;item&lt;/span&gt; &lt;span style="color: #9cdcfe;"&gt;name&lt;/span&gt;=&lt;span style="color: #ce9178;"&gt;"android:windowSplashScreenBackground"&lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;gt;&lt;/span&gt;#2B2A4E&lt;span style="color: grey;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;item&lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;        &lt;span style="color: grey;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;item&lt;/span&gt; &lt;span style="color: #9cdcfe;"&gt;name&lt;/span&gt;=&lt;span style="color: #ce9178;"&gt;"android:windowSplashScreenAnimatedIcon"&lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;gt;&lt;/span&gt;@drawable/android12splash&lt;span style="color: grey;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;item&lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;    &lt;span style="color: grey;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;style&lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;    &lt;span style="color: #6a9955;"&gt;&amp;lt;!-- Theme applied to the Android Window as soon as the process has started.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color: #6a9955;"&gt;         This theme determines the color of the Android Window while your&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color: #6a9955;"&gt;         Flutter UI initializes, as well as behind your Flutter UI while its&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color: #6a9955;"&gt;         running.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color: #6a9955;"&gt;         This Theme is only used starting with V2 of Flutter's Android embedding. --&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;    &lt;span style="color: grey;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;style&lt;/span&gt; &lt;span style="color: #9cdcfe;"&gt;name&lt;/span&gt;=&lt;span style="color: #ce9178;"&gt;"NormalTheme"&lt;/span&gt; &lt;span style="color: #9cdcfe;"&gt;parent&lt;/span&gt;=&lt;span style="color: #ce9178;"&gt;"@android:style/Theme.Light.NoTitleBar"&lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;        &lt;span style="color: grey;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;item&lt;/span&gt; &lt;span style="color: #9cdcfe;"&gt;name&lt;/span&gt;=&lt;span style="color: #ce9178;"&gt;"android:windowBackground"&lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;gt;&lt;/span&gt;?android:colorBackground&lt;span style="color: grey;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;item&lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;    &lt;span style="color: grey;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;style&lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color: grey;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;resources&lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;2.&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;As I have mentioned earlier, an icon for Android 12 must have some specific dimensions. That is why we use here an image named&amp;nbsp;&lt;/span&gt;&lt;code style="background-color: #f9f4f0; border-radius: 2px; box-sizing: border-box; color: #af0000; font-family: monospace, monospace; font-size: 14.4px; margin-bottom: 0px; margin-top: 0px; padding: 2px 4px;"&gt;android12splash&lt;/code&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;instead of&lt;/span&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;code style="background-color: #f9f4f0; border-radius: 2px; box-sizing: border-box; color: #af0000; font-family: monospace, monospace; font-size: 14.4px; margin-bottom: 0px; margin-top: 0px; padding: 2px 4px;"&gt;logo&lt;/code&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;(which was used earlier in&lt;/span&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;code style="background-color: #f9f4f0; border-radius: 2px; box-sizing: border-box; color: #af0000; font-family: monospace, monospace; font-size: 14.4px; margin-bottom: 0px; margin-top: 0px; padding: 2px 4px;"&gt;launch_background.xml&lt;/code&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;file as our icon.)&lt;/span&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; margin: 24px 0px;"&gt;As&amp;nbsp;&lt;a href="https://developer.android.com/guide/topics/ui/splash-screen" rel="nofollow noopener noreferrer" style="box-sizing: border-box;" target="_blank"&gt;documentation&lt;/a&gt;&amp;nbsp;says:&lt;/p&gt;&lt;ul style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; list-style: none; margin: 24px 0px; padding-left: 24px;"&gt;&lt;li style="box-sizing: border-box; position: relative;"&gt;&lt;em style="box-sizing: border-box; margin-bottom: 0px; margin-top: 0px;"&gt;App icon with an icon background: This should be 240×240 dp, and fit within a circle of 160 dp in diameter.&lt;/em&gt;&lt;/li&gt;&lt;li style="box-sizing: border-box; position: relative;"&gt;&lt;em style="box-sizing: border-box; margin-bottom: 0px; margin-top: 0px;"&gt;App icon without an icon background: This should be 288×288 dp, and fit within a circle of 192 dp in diameter.&lt;/em&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; margin: 24px 0px;"&gt;To generate all required icons, we can use one of the online tools presented earlier.&lt;/p&gt;&lt;p style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; margin: 24px 0px;"&gt;For example, first - an icon with wrong dimensions:&lt;/p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoC_arQxy7xawCPmkHldvg041459NIO3mqcU8t24SZhhaA4gdTKeID6225s7P9784F7DhNytKAvrGgJPKOAiu4vsKwC3oQUFk51ItTdYa1YxnIzRFy2gioMRSoWCJII_Kq-RoO_J4yU_yQaU1436y_p4Znwpzg7KatRqzer5wQtb1b7GXYzVq1V2y9QA/s2280/Android_12_wrong_icon_size_9488b9d582.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="2280" data-original-width="1080" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoC_arQxy7xawCPmkHldvg041459NIO3mqcU8t24SZhhaA4gdTKeID6225s7P9784F7DhNytKAvrGgJPKOAiu4vsKwC3oQUFk51ItTdYa1YxnIzRFy2gioMRSoWCJII_Kq-RoO_J4yU_yQaU1436y_p4Znwpzg7KatRqzer5wQtb1b7GXYzVq1V2y9QA/s320/Android_12_wrong_icon_size_9488b9d582.png" width="152" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;and second - with proper ones:&lt;/span&gt;&lt;div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwRgDRDJ-cdX5KkB_Rnn6R93zxUFOfv_yZG05t1KBRWGa_4v5QejIHlSyH98GS7f1nETHusqIBPTpsXvBWLxU4zS0vztF4_D6VJx1yJ5KZwd0YaURtrVsRrdxVt-qSIjmvsinMO7h8zH2Cl8kL05wP_FI7l8SWCkW6bM3Z7AHXdTXz_1d95rJ5GsCeKA/s2280/Android_12_good_icon_0bb8f22ff4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="2280" data-original-width="1080" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwRgDRDJ-cdX5KkB_Rnn6R93zxUFOfv_yZG05t1KBRWGa_4v5QejIHlSyH98GS7f1nETHusqIBPTpsXvBWLxU4zS0vztF4_D6VJx1yJ5KZwd0YaURtrVsRrdxVt-qSIjmvsinMO7h8zH2Cl8kL05wP_FI7l8SWCkW6bM3Z7AHXdTXz_1d95rJ5GsCeKA/s320/Android_12_good_icon_0bb8f22ff4.png" width="152" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;h3 style="box-sizing: border-box; color: #02294e; font-family: Roboto, sans-serif; font-size: 24px; font-weight: 500; line-height: 36px; margin: 24px 0px 0px;"&gt;Flutter Splash Screen&lt;/h3&gt;&lt;p style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; margin: 24px 0px;"&gt;flutter_native_splash&amp;nbsp;is a fast way to create a splash screen for both iOS and Android apps. It has some limitations, but in most cases, it is sufficient.&lt;/p&gt;&lt;ol style="box-sizing: border-box; counter-reset: ordered 0; font-family: Lora, serif; font-size: 16px; list-style: none; margin: 24px 0px; padding-left: 24px;"&gt;&lt;li style="box-sizing: border-box; counter-increment: ordered 1; position: relative;"&gt;First, we need to add a package to the&amp;nbsp;&lt;code style="background-color: #f9f4f0; border-radius: 2px; box-sizing: border-box; color: #af0000; font-family: monospace, monospace; font-size: 14.4px; margin-bottom: 0px; margin-top: 0px; padding: 2px 4px;"&gt;pubspec.yaml&lt;/code&gt;&amp;nbsp;file under&amp;nbsp;&lt;code style="background-color: #f9f4f0; border-radius: 2px; box-sizing: border-box; color: #af0000; font-family: monospace, monospace; font-size: 14.4px; margin-bottom: 0px; margin-top: 0px; padding: 2px 4px;"&gt;dev_dependencies&lt;/code&gt;&amp;nbsp;(or under&amp;nbsp;&lt;code style="background-color: #f9f4f0; border-radius: 2px; box-sizing: border-box; color: #af0000; font-family: monospace, monospace; font-size: 14.4px; margin-bottom: 0px; margin-top: 0px; padding: 2px 4px;"&gt;dependencies&lt;/code&gt;&amp;nbsp;sometimes &#128521;`). I am using version 2.1.0.&lt;/li&gt;&lt;/ol&gt;&lt;p style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; margin: 24px 0px;"&gt;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;Most important lines:&lt;/span&gt;&lt;/p&gt;&lt;ul style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; list-style: none; margin: 24px 0px; padding-left: 24px;"&gt;&lt;li style="box-sizing: border-box; position: relative;"&gt;Line 14 - setting the color of a background. As you can see in the next line, we are also able to set a background image instead of a single color.&lt;/li&gt;&lt;li style="box-sizing: border-box; position: relative;"&gt;Line 22 - setting an icon.&lt;/li&gt;&lt;li style="box-sizing: border-box; position: relative;"&gt;Line 53 - setting an icon for Android 12 and higher.&lt;/li&gt;&lt;li style="box-sizing: border-box; position: relative;"&gt;There is also an option to set different colors and icons depending on dark/light mode/theme and much more, which is well documented and easy to understand.&lt;/li&gt;&lt;/ul&gt;&lt;div style="background-color: #1e1e1e; color: #d4d4d4; font-family: Menlo, Monaco, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12px; line-height: 18px; white-space: pre;"&gt;&lt;div&gt;flutter_native_splash:&lt;/div&gt;&lt;br /&gt;&lt;div&gt;  # This package generates native code to customize Flutter's default white native splash screen&lt;/div&gt;&lt;div&gt;  # with background color and splash image.&lt;/div&gt;&lt;div&gt;  # Customize the parameters below, and run the following command in the terminal:&lt;/div&gt;&lt;div&gt;  # flutter pub run flutter_native_splash:create&lt;/div&gt;&lt;div&gt;  # To restore Flutter's default white splash screen, run the following command in the terminal:&lt;/div&gt;&lt;div&gt;  # flutter pub run flutter_native_splash:remove&lt;/div&gt;&lt;br /&gt;&lt;div&gt;  # color or background_image is the only required parameter.  Use color to set the background&lt;/div&gt;&lt;div&gt;  # of your splash screen to a solid color.  Use background_image to set the background of your&lt;/div&gt;&lt;div&gt;  # splash screen to a png image.  This is useful for gradients. The image will be stretch to the&lt;/div&gt;&lt;div&gt;  # size of the app. Only one parameter can be used, color and background_image cannot both be set.&lt;/div&gt;&lt;div&gt;  color: "#2b2a4e"&lt;/div&gt;&lt;div&gt;  #background_image: "assets/splash/background.png"&lt;/div&gt;&lt;br /&gt;&lt;div&gt;  # Optional parameters are listed below.  To enable a parameter, uncomment the line by removing&lt;/div&gt;&lt;div&gt;  # the leading # character.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;  # The image parameter allows you to specify an image used in the splash screen.  It must be a&lt;/div&gt;&lt;div&gt;  # png file and should be sized for 4x pixel density.&lt;/div&gt;&lt;div&gt;  image: assets/logo.png&lt;/div&gt;&lt;br /&gt;&lt;div&gt;  # The branding property allows you to specify an image used as branding in the splash screen.&lt;/div&gt;&lt;div&gt;  # It must be a png file. Currently, it is only supported for Android &amp;lt; v12 and iOS.&lt;/div&gt;&lt;div&gt;  #branding: assets/dart.png&lt;/div&gt;&lt;br /&gt;&lt;div&gt;  # To position the branding image at the bottom of the screen you can use bottom, bottomRight,&lt;/div&gt;&lt;div&gt;  # and bottomLeft. The default values is bottom if not specified or specified something else.&lt;/div&gt;&lt;div&gt;  #branding_mode: bottom&lt;/div&gt;&lt;br /&gt;&lt;div&gt;  # The color_dark, background_image_dark, image_dark, branding_dark are parameters that set the background&lt;/div&gt;&lt;div&gt;  # and image when the device is in dark mode. If they are not specified, the app will use the&lt;/div&gt;&lt;div&gt;  # parameters from above. If the image_dark parameter is specified, color_dark or&lt;/div&gt;&lt;div&gt;  # background_image_dark must be specified.  color_dark and background_image_dark cannot both be&lt;/div&gt;&lt;div&gt;  # set.&lt;/div&gt;&lt;div&gt;  #color_dark: "#042a49"&lt;/div&gt;&lt;div&gt;  #background_image_dark: "assets/dark-background.png"&lt;/div&gt;&lt;div&gt;  #image_dark: assets/splash-invert.png&lt;/div&gt;&lt;div&gt;  #branding_dark: assets/dart_dark.png&lt;/div&gt;&lt;br /&gt;&lt;div&gt;  # Android 12 handles the splash screen differently than previous versions.  Please visit&lt;/div&gt;&lt;div&gt;  # https://developer.android.com/guide/topics/ui/splash-screen&lt;/div&gt;&lt;div&gt;  # Following are Android 12 specific parameter.&lt;/div&gt;&lt;div&gt;  android_12:&lt;/div&gt;&lt;div&gt;    # The image parameter sets the splash screen icon image.  If this parameter is not specified,&lt;/div&gt;&lt;div&gt;    # the app's launcher icon will be used instead.&lt;/div&gt;&lt;div&gt;    # Please note that the splash screen will be clipped to a circle on the center of the screen.&lt;/div&gt;&lt;div&gt;    # App icon with an icon background: This should be 960×960 pixels, and fit within a circle&lt;/div&gt;&lt;div&gt;    # 640 pixels in diameter.&lt;/div&gt;&lt;div&gt;    # App icon without an icon background: This should be 1152×1152 pixels, and fit within a circle&lt;/div&gt;&lt;div&gt;    # 768 pixels in diameter.&lt;/div&gt;&lt;div&gt;    image: assets/android12splash.png&lt;/div&gt;&lt;br /&gt;&lt;div&gt;    # App icon background color.&lt;/div&gt;&lt;div&gt;    #icon_background_color: "#111111"&lt;/div&gt;&lt;br /&gt;&lt;div&gt;    # The image_dark parameter and icon_background_color_dark set the image and icon background&lt;/div&gt;&lt;div&gt;    # color when the device is in dark mode. If they are not specified, the app will use the&lt;/div&gt;&lt;div&gt;    # parameters from above.&lt;/div&gt;&lt;div&gt;    #image_dark: assets/android12splash-invert.png&lt;/div&gt;&lt;div&gt;    #icon_background_color_dark: "#eeeeee"&lt;/div&gt;&lt;br /&gt;&lt;div&gt;  # The android, ios and web parameters can be used to disable generating a splash screen on a given&lt;/div&gt;&lt;div&gt;  # platform.&lt;/div&gt;&lt;div&gt;  #android: false&lt;/div&gt;&lt;div&gt;  #ios: false&lt;/div&gt;&lt;div&gt;  web: false&lt;/div&gt;&lt;br /&gt;&lt;div&gt;  # The position of the splash image can be set with android_gravity, ios_content_mode, and&lt;/div&gt;&lt;div&gt;  # web_image_mode parameters.  All default to center.&lt;/div&gt;&lt;div&gt;  #&lt;/div&gt;&lt;div&gt;  # android_gravity can be one of the following Android Gravity (see&lt;/div&gt;&lt;div&gt;  # https://developer.android.com/reference/android/view/Gravity): bottom, center,&lt;/div&gt;&lt;div&gt;  # center_horizontal, center_vertical, clip_horizontal, clip_vertical, end, fill, fill_horizontal,&lt;/div&gt;&lt;div&gt;  # fill_vertical, left, right, start, or top.&lt;/div&gt;&lt;div&gt;  #android_gravity: center&lt;/div&gt;&lt;div&gt;  #&lt;/div&gt;&lt;div&gt;  # ios_content_mode can be one of the following iOS UIView.ContentMode (see&lt;/div&gt;&lt;div&gt;  # https://developer.apple.com/documentation/uikit/uiview/contentmode): scaleToFill,&lt;/div&gt;&lt;div&gt;  # scaleAspectFit, scaleAspectFill, center, top, bottom, left, right, topLeft, topRight,&lt;/div&gt;&lt;div&gt;  # bottomLeft, or bottomRight.&lt;/div&gt;&lt;div&gt;  #ios_content_mode: center&lt;/div&gt;&lt;div&gt;  #&lt;/div&gt;&lt;div&gt;  # web_image_mode can be one of the following modes: center, contain, stretch, and cover.&lt;/div&gt;&lt;div&gt;  #web_image_mode: center&lt;/div&gt;&lt;br /&gt;&lt;div&gt;  # To hide the notification bar, use the fullscreen parameter.  Has no effect in web since web&lt;/div&gt;&lt;div&gt;  # has no notification bar.  Defaults to false.&lt;/div&gt;&lt;div&gt;  # NOTE: Unlike Android, iOS will not automatically show the notification bar when the app loads.&lt;/div&gt;&lt;div&gt;  #       To show the notification bar, add the following code to your Flutter app:&lt;/div&gt;&lt;div&gt;  #       WidgetsFlutterBinding.ensureInitialized();&lt;/div&gt;&lt;div&gt;  #       SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.bottom, SystemUiOverlay.top]);&lt;/div&gt;&lt;div&gt;  fullscreen: true&lt;/div&gt;&lt;div&gt;  &lt;/div&gt;&lt;div&gt;  # If you have changed the name(s) of your info.plist file(s), you can specify the filename(s) &lt;/div&gt;&lt;div&gt;  # with the info_plist_files parameter.  Remove only the # characters in the three lines below,&lt;/div&gt;&lt;div&gt;  # do not remove any spaces:&lt;/div&gt;&lt;div&gt;  #info_plist_files:&lt;/div&gt;&lt;div&gt;  #  - 'ios/Runner/Info-Debug.plist'&lt;/div&gt;&lt;div&gt;  #  - 'ios/Runner/Info-Release.plist'&lt;/div&gt;&lt;/div&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&lt;div&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;1.&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Then, set the appearance of our splash screen using the&amp;nbsp;&lt;/span&gt;&lt;code style="background-color: #f9f4f0; border-radius: 2px; box-sizing: border-box; color: #af0000; font-family: monospace, monospace; font-size: 14.4px; margin-bottom: 0px; margin-top: 0px; padding: 2px 4px;"&gt;flutter_native_splash.yaml&lt;/code&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;file.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Lora, serif;"&gt;2.&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;The last step is to run command&lt;/span&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;code style="background-color: #f9f4f0; border-radius: 2px; box-sizing: border-box; color: #af0000; font-family: monospace, monospace; font-size: 14.4px; margin-bottom: 0px; margin-top: 0px; padding: 2px 4px;"&gt;flutter pub run flutter_native_splash:create --path=flutter_native_splash.yaml&lt;/code&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;. And that is all!&lt;/span&gt;&lt;p style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; margin: 24px 0px;"&gt;One more thing to explain, what is the reason to place the&amp;nbsp;&lt;code style="background-color: #f9f4f0; border-radius: 2px; box-sizing: border-box; color: #af0000; font-family: monospace, monospace; font-size: 14.4px; padding: 2px 4px;"&gt;flutter_native_splash&lt;/code&gt;&amp;nbsp;package under&amp;nbsp;&lt;code style="background-color: #f9f4f0; border-radius: 2px; box-sizing: border-box; color: #af0000; font-family: monospace, monospace; font-size: 14.4px; padding: 2px 4px;"&gt;dependencies&lt;/code&gt;? With the version&amp;nbsp;&lt;code style="background-color: #f9f4f0; border-radius: 2px; box-sizing: border-box; color: #af0000; font-family: monospace, monospace; font-size: 14.4px; padding: 2px 4px;"&gt;2.0.3+1&lt;/code&gt;&amp;nbsp;the package allows us to select the time when the splash screen should disappear. So now we are able to initialize everything we need to start the app and then show our first screen. Previously, when the app was ready to render the first frame of the app, the native splash screen (so that one we were creating) disappeared and there was a need to create a special page being our splash screen until the whole app was initialized.&lt;/p&gt;&lt;p style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; margin: 24px 0px;"&gt;So to keep displaying the native splash screen, we need to write two simple lines of code 7-8:&lt;/p&gt;&lt;div style="background-color: #1e1e1e; color: #d4d4d4; font-family: Menlo, Monaco, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12px; line-height: 18px; white-space: pre;"&gt;&lt;div&gt;Future&lt;span style="color: grey;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;void&lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;gt;&lt;/span&gt; main() async {&lt;/div&gt;&lt;div&gt;  await initApp();&lt;/div&gt;&lt;div&gt;  runApp(const MyApp());&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;br /&gt;&lt;div&gt;initApp() {&lt;/div&gt;&lt;div&gt;  WidgetsBinding widgetsBinding = WidgetsFlutterBinding.ensureInitialized();&lt;/div&gt;&lt;div&gt;  FlutterNativeSplash.preserve(widgetsBinding: widgetsBinding);&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; margin: 24px 0px;"&gt;After that, the splash screen will be visible until we call&amp;nbsp;&lt;code style="background-color: #f9f4f0; border-radius: 2px; box-sizing: border-box; color: #af0000; font-family: monospace, monospace; font-size: 14.4px; padding: 2px 4px;"&gt;​​FlutterNativeSplash.remove();&lt;/code&gt;.&lt;/p&gt;&lt;h3 style="box-sizing: border-box; color: #02294e; font-family: Roboto, sans-serif; font-size: 24px; font-weight: 500; line-height: 36px; margin: 24px 0px 0px;"&gt;What is under the hood?&lt;/h3&gt;&lt;p style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; margin: 24px 0px;"&gt;Let’s check what changes the&amp;nbsp;&lt;code style="background-color: #f9f4f0; border-radius: 2px; box-sizing: border-box; color: #af0000; font-family: monospace, monospace; font-size: 14.4px; padding: 2px 4px;"&gt;flutter_native_splash&lt;/code&gt;&amp;nbsp;package makes to our project after running the generate command.&lt;/p&gt;&lt;h4 style="box-sizing: border-box; color: #02294e; font-family: Roboto, sans-serif; font-size: 16px;"&gt;iOS changes&lt;/h4&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-5IjrjYU3POfHpVVhJScdZqJyIRLjruojm2pZAUpWKya4KBUetdgNAILrk3bpgDThDEq1XWvMkc5j7PlRkm4iLXq7MwAyYgh2Z429HT41udqC9KNG3rKW_l-2kXz1WDRxE0AL_MtW-0_OgZqsp9GJ3H1RsXIKvCj0FtjM0dW1iRKFlj7IQA-cS6OZng/s597/flutter_native_splash_i_OS_changes_bfb22c8785.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="273" data-original-width="597" height="146" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-5IjrjYU3POfHpVVhJScdZqJyIRLjruojm2pZAUpWKya4KBUetdgNAILrk3bpgDThDEq1XWvMkc5j7PlRkm4iLXq7MwAyYgh2Z429HT41udqC9KNG3rKW_l-2kXz1WDRxE0AL_MtW-0_OgZqsp9GJ3H1RsXIKvCj0FtjM0dW1iRKFlj7IQA-cS6OZng/s320/flutter_native_splash_i_OS_changes_bfb22c8785.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; font-weight: bolder;"&gt;Info.plist&lt;/span&gt;&lt;span style="font-family: Lora, serif; font-size: 16px;"&gt;&amp;nbsp;- setting a flag to hide status bar during splash screen.&lt;/span&gt;&lt;div&gt;&lt;span style="font-family: Lora, serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9rBShBuBomKcg0uEU93q2dywzyjzgYRxe_DVCT-PikZaQDJEl4C_DxxwWJDFIT1zunxY7_ZB9MS0wyRhafDuE3McmYwTsrWsOYbdWn2HPM9DN2XJChWWfFAcH_OK0F_6YX7g0B27Gwt5pg_Ffl0d9oQeAgP_fnX5nyp06z7-U7f_kinqYlNKdVchVLQ/s1217/flutter_native_splash_i_OS_changes_Infoplist_7e9550a75a.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="184" data-original-width="1217" height="48" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9rBShBuBomKcg0uEU93q2dywzyjzgYRxe_DVCT-PikZaQDJEl4C_DxxwWJDFIT1zunxY7_ZB9MS0wyRhafDuE3McmYwTsrWsOYbdWn2HPM9DN2XJChWWfFAcH_OK0F_6YX7g0B27Gwt5pg_Ffl0d9oQeAgP_fnX5nyp06z7-U7f_kinqYlNKdVchVLQ/s320/flutter_native_splash_i_OS_changes_Infoplist_7e9550a75a.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;p style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; margin: 24px 0px;"&gt;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;ios/Runner/Assets.xcassets/BrandingImage.imageset/*&lt;/span&gt;&amp;nbsp;- directory for setting branding image at the bottom of the splash screen. We didn’t set that in our config file&amp;nbsp;&lt;code style="background-color: #f9f4f0; border-radius: 2px; box-sizing: border-box; color: #af0000; font-family: monospace, monospace; font-size: 14.4px; padding: 2px 4px;"&gt;flutter_native_splash.yaml&lt;/code&gt;, but it was generated anyway. So we can remove that whole directory&amp;nbsp;&lt;code style="background-color: #f9f4f0; border-radius: 2px; box-sizing: border-box; color: #af0000; font-family: monospace, monospace; font-size: 14.4px; padding: 2px 4px;"&gt;BrandingImage.imageset&lt;/code&gt;.&lt;/p&gt;&lt;p style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; margin: 24px 0px;"&gt;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;ios/Runner/Assets.xcassets/BackgroundImage.imageset/background.image&lt;/span&gt;&amp;nbsp;- this package uses a storyboard to set a splash screen for iOS. In storyboard, it sets background as an image. So firstly, the package generates an asset image (1x1 pixel) which represents a background color and then sets it as a background image.&lt;/p&gt;&lt;p style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; margin: 24px 0px;"&gt;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;ios/Runner/Assets.xcassets/LaunchImage.imageset/*&lt;/span&gt;&amp;nbsp;- directory for icon (“logo.png”) automatically generated in different resolutions.&lt;/p&gt;&lt;p style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; margin: 24px 0px;"&gt;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;ios/Runner/Base.lproj/LaunchScreen.storyboard&amp;nbsp;&lt;/span&gt;- as I have mentioned earlier, the package uses storyboard in which icon and background color is being set.&lt;/p&gt;&lt;h4 style="box-sizing: border-box; color: #02294e; font-family: Roboto, sans-serif; font-size: 16px;"&gt;Android changes&lt;/h4&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-JYMw73W2WXgeRM82HTcSnbWIGL9mS9TinL05OEYBUWebiSkq4WDSy28jp5WfDMKhRtFuy2twULwZQVBek76KOtEoRcBSmE0JtVhPGFa_90EkGA1TG7FUIH8DmXa2Xpe5wrsO9Imb3zBVN9CY5OwvgLyGNS8hGk-NHeNbGZCyOzFmXKXJl0SpyDzBZQ/s536/flutter_native_splash_Android_changes_c5d52f59f1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="463" data-original-width="536" height="276" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-JYMw73W2WXgeRM82HTcSnbWIGL9mS9TinL05OEYBUWebiSkq4WDSy28jp5WfDMKhRtFuy2twULwZQVBek76KOtEoRcBSmE0JtVhPGFa_90EkGA1TG7FUIH8DmXa2Xpe5wrsO9Imb3zBVN9CY5OwvgLyGNS8hGk-NHeNbGZCyOzFmXKXJl0SpyDzBZQ/s320/flutter_native_splash_Android_changes_c5d52f59f1.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;p style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; margin: 24px 0px;"&gt;All files named&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;android12splash.png&lt;/span&gt;&amp;nbsp;are generated images for different devices with Android 12 and higher placed in appropriate&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;drawable&lt;/span&gt;&amp;nbsp;directories.&lt;/p&gt;&lt;p style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; margin: 24px 0px;"&gt;All files named&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;logo.png&lt;/span&gt;&amp;nbsp;are generated images for different devices with Android 11 and lower placed in appropriate&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;drawable&amp;nbsp;&lt;/span&gt;directories.&lt;/p&gt;&lt;p style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; margin: 24px 0px;"&gt;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;background.png&lt;/span&gt;&amp;nbsp;- image 1x1 pixel which represents a background color. This file is later used in the&amp;nbsp;&lt;code style="background-color: #f9f4f0; border-radius: 2px; box-sizing: border-box; color: #af0000; font-family: monospace, monospace; font-size: 14.4px; padding: 2px 4px;"&gt;launch_background.xml&lt;/code&gt;&amp;nbsp;file to set the background.&lt;/p&gt;&lt;p style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; margin: 24px 0px;"&gt;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;launch_background.xml&amp;nbsp;&lt;/span&gt;- the same file we have been modifying earlier, when setting the splash screen without a package, but with some changes.&lt;/p&gt;&lt;div style="background-color: #1e1e1e; color: #d4d4d4; font-family: Menlo, Monaco, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12px; line-height: 18px; white-space: pre;"&gt;&lt;div&gt;&lt;span style="color: grey;"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;xml&lt;/span&gt;&lt;span style="color: #9cdcfe;"&gt; version&lt;/span&gt;=&lt;span style="color: #ce9178;"&gt;"1.0"&lt;/span&gt;&lt;span style="color: #9cdcfe;"&gt; encoding&lt;/span&gt;=&lt;span style="color: #ce9178;"&gt;"utf-8"&lt;/span&gt;&lt;span style="color: grey;"&gt;?&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color: grey;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;layer-list&lt;/span&gt; &lt;span style="color: #9cdcfe;"&gt;xmlns:android&lt;/span&gt;=&lt;span style="color: #ce9178;"&gt;"http://schemas.android.com/apk/res/android"&lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;    &lt;span style="color: grey;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;item&lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;        &lt;span style="color: grey;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;bitmap&lt;/span&gt; &lt;span style="color: #9cdcfe;"&gt;android:gravity&lt;/span&gt;=&lt;span style="color: #ce9178;"&gt;"fill"&lt;/span&gt; &lt;span style="color: #9cdcfe;"&gt;android:src&lt;/span&gt;=&lt;span style="color: #ce9178;"&gt;"@drawable/background"&lt;/span&gt;&lt;span style="color: grey;"&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;    &lt;span style="color: grey;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;item&lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;    &lt;span style="color: grey;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;item&lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;        &lt;span style="color: grey;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;bitmap&lt;/span&gt; &lt;span style="color: #9cdcfe;"&gt;android:gravity&lt;/span&gt;=&lt;span style="color: #ce9178;"&gt;"center"&lt;/span&gt; &lt;span style="color: #9cdcfe;"&gt;android:src&lt;/span&gt;=&lt;span style="color: #ce9178;"&gt;"@drawable/splash"&lt;/span&gt;&lt;span style="color: grey;"&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;    &lt;span style="color: grey;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;item&lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color: grey;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #569cd6;"&gt;layer-list&lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; margin: 24px 0px;"&gt;In&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;drawable&lt;/span&gt;&amp;nbsp;and&amp;nbsp;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;drawable-v21&lt;/span&gt;&amp;nbsp;directories, we have exactly the same files, so we can remove the latter one if we want.&lt;/p&gt;&lt;p style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; margin: 24px 0px;"&gt;&lt;span style="box-sizing: border-box; font-weight: bolder;"&gt;android/app/src/main/res/values/styles.xml&lt;/span&gt;&amp;nbsp;- again, the same file we have been modifying earlier with some differences i.e. added two flags&amp;nbsp;&lt;code style="background-color: #f9f4f0; border-radius: 2px; box-sizing: border-box; color: #af0000; font-family: monospace, monospace; font-size: 14.4px; padding: 2px 4px;"&gt;forceDarkAllowed&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code style="background-color: #f9f4f0; border-radius: 2px; box-sizing: border-box; color: #af0000; font-family: monospace, monospace; font-size: 14.4px; padding: 2px 4px;"&gt;windowFullscreen&lt;/code&gt;.&lt;/p&gt;&lt;p style="box-sizing: border-box; font-family: Lora, serif; font-size: 16px; margin: 24px 0px;"&gt;So as you can see, there is no magic.&amp;nbsp;&lt;code style="background-color: #f9f4f0; border-radius: 2px; box-sizing: border-box; color: #af0000; font-family: monospace, monospace; font-size: 14.4px; padding: 2px 4px;"&gt;flutter_native_splash&lt;/code&gt;&amp;nbsp;Package does everything that we can do ourselves, but faster &#128522;.&lt;/p&gt;&lt;/div&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMX76U7AZ2WXDfw2oD7G8vlFRaIcOSDjTl-KZatXcSCjTOnkqr69syvM11iEpMTQMUw8esIZVYunEd1OHqmEhES50HUevVJNuNTzvobjLLwbhDAoSdDnV5y9cpyRB-jzlVpI-R67oKTxOueecJltVIEUH_lcMcIl9fUwAmbGDBG84PIlwFI5x0XZDizw/s72-c/Android_8_3b6a6b4106.gif" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>sunnikmr8@gmail.com (www.projects-codes.blogspot.in)</author></item><item><title>How To Change Value In Appbar Text Flutter On Button Click From Other class</title><link>http://projects-codes.blogspot.com/2022/12/how-to-change-value-in-appbar-text.html</link><pubDate>Mon, 26 Dec 2022 04:26:00 -0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6452986121841458587.post-4865215145352865624</guid><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h1 class="fs-headline1 ow-break-word mb8 flex--item fl1" itemprop="name" style="background-color: white; border: 0px; box-sizing: inherit; color: #232629; flex: 1 1 auto; font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe UI Adjusted&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Liberation Sans&amp;quot;, sans-serif; font-size: var(--fs-headline1) !important; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; font-weight: inherit; line-height: 1.3; margin-bottom: var(--su8) !important; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-wrap: break-word; padding: 0px; vertical-align: baseline;"&gt;How to Update State of Parent StatefulWidget from other Child StatefulWidget in Flutter?&lt;/h1&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Hi! all today we going to learn how we can update or change text of parent StatefulWidget in appbar from the child StatefulWidget in flutter.&lt;/div&gt;&lt;div&gt;Same as we can also change any color, icon or other data of parent widget.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;pre class="lang-dart s-code-block" style="--_cb-line-numbers-bg: var(--black-050); border-radius: var(--br-md); border: 0px; box-sizing: inherit; color: var(--highlight-color); font-family: var(--ff-mono); font-size: var(--fs-body1); font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: var(--lh-md); margin-bottom: 0px; margin-top: 0px; max-height: 600px; overflow-wrap: normal; overflow: auto; padding: var(--su12); vertical-align: baseline; width: auto;"&gt;&lt;div style="background-color: #1e1e1e; color: #d4d4d4; font-family: Menlo, Monaco, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12px; line-height: 18px;"&gt;&lt;div&gt;&lt;span style="color: #569cd6;"&gt;class&lt;/span&gt; &lt;span style="color: #4ec9b0;"&gt;ParentWidget&lt;/span&gt; &lt;span style="color: #569cd6;"&gt;extends&lt;/span&gt; &lt;span style="color: #4ec9b0;"&gt;StatelessWidget&lt;/span&gt; {&lt;/div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #4ec9b0;"&gt;int&lt;/span&gt; cartitem = &lt;span style="color: #b5cea8;"&gt;0&lt;/span&gt;;&lt;div&gt;  &lt;span style="color: #569cd6;"&gt;@override&lt;/span&gt;&lt;/div&gt;&lt;div&gt;  &lt;span style="color: #4ec9b0;"&gt;Widget&lt;/span&gt; &lt;span style="color: #dcdcaa;"&gt;build&lt;/span&gt;(&lt;span style="color: #4ec9b0;"&gt;BuildContext&lt;/span&gt; context) {&lt;/div&gt;&lt;div&gt;    &lt;span style="color: #c586c0;"&gt;return&lt;/span&gt; &lt;span style="color: #4ec9b0;"&gt;Scaffold&lt;/span&gt;(&lt;/div&gt;&lt;div&gt;      appBar: &lt;span style="color: #4ec9b0;"&gt;AppBar&lt;/span&gt;(&lt;/div&gt;&lt;div&gt;        titleSpacing: &lt;span style="color: #b5cea8;"&gt;0&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;        leading: &lt;span style="color: #4ec9b0;"&gt;Icon&lt;/span&gt;(&lt;/div&gt;&lt;div&gt;          &lt;span style="color: #4ec9b0;"&gt;Icons&lt;/span&gt;.location_on,&lt;/div&gt;&lt;div&gt;          size: &lt;span style="color: #b5cea8;"&gt;20&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;          color: &lt;span style="color: #4ec9b0;"&gt;Colors&lt;/span&gt;.white,&lt;/div&gt;&lt;div&gt;        ),&lt;/div&gt;&lt;div&gt;        title: &lt;span style="color: #4ec9b0;"&gt;Text&lt;/span&gt;(&lt;span style="color: #ce9178;"&gt;"Title"&lt;/span&gt;),&lt;/div&gt;&lt;div&gt;        actions: &amp;lt;&lt;span style="color: #4ec9b0;"&gt;Widget&lt;/span&gt;&amp;gt;[&lt;/div&gt;&lt;div&gt;          &lt;span style="color: #4ec9b0;"&gt;Stack&lt;/span&gt;(&lt;/div&gt;&lt;div&gt;            children: [&lt;/div&gt;&lt;div&gt;              &lt;span style="color: #4ec9b0;"&gt;IconButton&lt;/span&gt;(&lt;/div&gt;&lt;div&gt;                icon: &lt;span style="color: #4ec9b0;"&gt;Icon&lt;/span&gt;(&lt;span style="color: #4ec9b0;"&gt;Icons&lt;/span&gt;.shopping_cart),&lt;/div&gt;&lt;div&gt;                color: &lt;span style="color: #4ec9b0;"&gt;Colors&lt;/span&gt;.white,&lt;/div&gt;&lt;div&gt;              ),&lt;/div&gt;&lt;div&gt;              &lt;span style="color: #4ec9b0;"&gt;Positioned&lt;/span&gt;.&lt;span style="color: #dcdcaa;"&gt;directional&lt;/span&gt;(&lt;/div&gt;&lt;div&gt;                textDirection: &lt;span style="color: #4ec9b0;"&gt;Directionality&lt;/span&gt;.&lt;span style="color: #dcdcaa;"&gt;of&lt;/span&gt;(context),&lt;/div&gt;&lt;div&gt;                top: &lt;span style="color: #b5cea8;"&gt;8&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;                end: &lt;span style="color: #b5cea8;"&gt;12&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;                child: &lt;span style="color: #4ec9b0;"&gt;CircleAvatar&lt;/span&gt;(&lt;/div&gt;&lt;div&gt;                  backgroundColor: &lt;span style="color: #4ec9b0;"&gt;Colors&lt;/span&gt;.red,&lt;/div&gt;&lt;div&gt;                  radius: &lt;span style="color: #b5cea8;"&gt;5.5&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;                  child: &lt;span style="color: #4ec9b0;"&gt;Center&lt;/span&gt;(&lt;/div&gt;&lt;div&gt;                      child: &lt;span style="color: #4ec9b0;"&gt;Text&lt;/span&gt;(&lt;/div&gt;&lt;div&gt;                    cartitem.&lt;span style="color: #dcdcaa;"&gt;toString&lt;/span&gt;(),&lt;/div&gt;&lt;div&gt;                    style: &lt;span style="color: #4ec9b0;"&gt;Theme&lt;/span&gt;.&lt;span style="color: #dcdcaa;"&gt;of&lt;/span&gt;(context).textTheme.bodyText2!.&lt;span style="color: #dcdcaa;"&gt;copyWith&lt;/span&gt;(&lt;/div&gt;&lt;div&gt;                        color: &lt;span style="color: #4ec9b0;"&gt;Theme&lt;/span&gt;.&lt;span style="color: #dcdcaa;"&gt;of&lt;/span&gt;(context).scaffoldBackgroundColor,&lt;/div&gt;&lt;div&gt;                        fontSize: &lt;span style="color: #b5cea8;"&gt;9&lt;/span&gt;),&lt;/div&gt;&lt;div&gt;                  )),&lt;/div&gt;&lt;div&gt;                ),&lt;/div&gt;&lt;div&gt;              )&lt;/div&gt;&lt;div&gt;            ],&lt;/div&gt;&lt;div&gt;          ),&lt;/div&gt;&lt;div&gt;        ],&lt;/div&gt;&lt;div&gt;      ),&lt;/div&gt;&lt;div&gt;      body: &lt;span style="color: #4ec9b0;"&gt;ChildWidget&lt;/span&gt;(&lt;span style="color: #9cdcfe;"&gt;function&lt;/span&gt;: &lt;span style="color: #dcdcaa;"&gt;refreshCart&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;    );&lt;/div&gt;&lt;div&gt;  }&lt;/div&gt;&lt;br /&gt;&lt;div&gt;  &lt;span style="color: #dcdcaa;"&gt;refreshCart&lt;/span&gt;() {&lt;/div&gt;&lt;div&gt;    &lt;span style="color: #dcdcaa;"&gt;setState&lt;/span&gt;(() {&lt;/div&gt;&lt;div&gt;      cartitem++;&lt;/div&gt;&lt;div&gt;      &lt;span style="color: #dcdcaa;"&gt;print&lt;/span&gt;(&lt;span style="color: #ce9178;"&gt;"cart item updated : "&lt;/span&gt; + cartitem.&lt;span style="color: #dcdcaa;"&gt;toString&lt;/span&gt;());&lt;/div&gt;&lt;div&gt;    });&lt;/div&gt;&lt;div&gt;  }&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="color: #569cd6;"&gt;class&lt;/span&gt; &lt;span style="color: #4ec9b0;"&gt;ChildWidget&lt;/span&gt; &lt;span style="color: #569cd6;"&gt;extends&lt;/span&gt; &lt;span style="color: #4ec9b0;"&gt;StatefulWidget&lt;/span&gt; {&lt;/div&gt;&lt;div&gt;  &lt;span style="color: #569cd6;"&gt;final&lt;/span&gt; &lt;span style="color: #4ec9b0;"&gt;VoidCallback&lt;/span&gt; function;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;  &lt;span style="color: #4ec9b0;"&gt;ChildWidget&lt;/span&gt;({&lt;span style="color: #4ec9b0;"&gt;Key&lt;/span&gt;? key, &lt;span style="color: #569cd6;"&gt;required&lt;/span&gt; &lt;span style="color: #569cd6;"&gt;this&lt;/span&gt;.function}) : &lt;span style="color: #569cd6;"&gt;super&lt;/span&gt;(key: key);&lt;/div&gt;&lt;br /&gt;&lt;div&gt;  &lt;span style="color: #569cd6;"&gt;@override&lt;/span&gt;&lt;/div&gt;&lt;div&gt;  &lt;span style="color: #4ec9b0;"&gt;ChildWidgetState&lt;/span&gt; &lt;span style="color: #dcdcaa;"&gt;createState&lt;/span&gt;() =&amp;gt; &lt;span style="color: #4ec9b0;"&gt;ChildWidgetState&lt;/span&gt;();&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="color: #569cd6;"&gt;class&lt;/span&gt; &lt;span style="color: #4ec9b0;"&gt;ChildWidgetState&lt;/span&gt; &lt;span style="color: #569cd6;"&gt;extends&lt;/span&gt; &lt;span style="color: #4ec9b0;"&gt;State&lt;/span&gt;&amp;lt;&lt;span style="color: #4ec9b0;"&gt;ChildWidget&lt;/span&gt;&amp;gt; {&lt;/div&gt;&lt;div&gt;  &lt;span style="color: #569cd6;"&gt;@override&lt;/span&gt;&lt;/div&gt;&lt;div&gt;  &lt;span style="color: #4ec9b0;"&gt;Widget&lt;/span&gt; &lt;span style="color: #dcdcaa;"&gt;build&lt;/span&gt;(&lt;span style="color: #4ec9b0;"&gt;BuildContext&lt;/span&gt; context) {&lt;/div&gt;&lt;div&gt;    &lt;span style="color: #c586c0;"&gt;return&lt;/span&gt; &lt;span style="color: #4ec9b0;"&gt;Container&lt;/span&gt;(&lt;/div&gt;&lt;div&gt;      color: &lt;span style="color: #4ec9b0;"&gt;Colors&lt;/span&gt;.teal,&lt;/div&gt;&lt;div&gt;      width: &lt;span style="color: #4ec9b0;"&gt;double&lt;/span&gt;.infinity,&lt;/div&gt;&lt;div&gt;      alignment: &lt;span style="color: #4ec9b0;"&gt;Alignment&lt;/span&gt;.center,&lt;/div&gt;&lt;div&gt;      child: &lt;span style="color: #4ec9b0;"&gt;ElevatedButton&lt;/span&gt;(&lt;/div&gt;&lt;div&gt;        child: &lt;span style="color: #4ec9b0;"&gt;Text&lt;/span&gt;(&lt;span style="color: #ce9178;"&gt;"Call method in parent"&lt;/span&gt;),&lt;/div&gt;&lt;div&gt;        onPressed: () =&amp;gt; widget.&lt;span style="color: #dcdcaa;"&gt;function&lt;/span&gt;(), &lt;span style="color: #6a9955;"&gt;// calls method in parent&lt;/span&gt;&lt;/div&gt;&lt;div&gt;      ),&lt;/div&gt;&lt;div&gt;    );&lt;/div&gt;&lt;div&gt;  }&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Given code will update count of cart in parent widget from child widget on button click.&lt;/div&gt;&lt;div&gt;Output :&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfWR2MEO3Y-gSEbkAojoI4L930XHpeMqlK6qBRyUocThLbIP6h5mC69STJgUeK-ufPvPhNoULitbGMpCe6PWkhLfBcW3Csy1YVCjYoQkVvE5VvK11SmjAzsUzxTXWL-8F1RaTM2Vf7nKEbLqlOzVdbJN2FAtcohVQjZzKC7xKctcTj9ZM5k1fknqkAyQ/s1648/Screenshot%202022-12-26%20at%209.01.46%20PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="1648" data-original-width="958" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfWR2MEO3Y-gSEbkAojoI4L930XHpeMqlK6qBRyUocThLbIP6h5mC69STJgUeK-ufPvPhNoULitbGMpCe6PWkhLfBcW3Csy1YVCjYoQkVvE5VvK11SmjAzsUzxTXWL-8F1RaTM2Vf7nKEbLqlOzVdbJN2FAtcohVQjZzKC7xKctcTj9ZM5k1fknqkAyQ/w233-h400/Screenshot%202022-12-26%20at%209.01.46%20PM.png" width="233" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The above written code is working fine hope this work for you also in your concept.&lt;/div&gt;&lt;div&gt;Thankyou for visiting here.&lt;/div&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfWR2MEO3Y-gSEbkAojoI4L930XHpeMqlK6qBRyUocThLbIP6h5mC69STJgUeK-ufPvPhNoULitbGMpCe6PWkhLfBcW3Csy1YVCjYoQkVvE5VvK11SmjAzsUzxTXWL-8F1RaTM2Vf7nKEbLqlOzVdbJN2FAtcohVQjZzKC7xKctcTj9ZM5k1fknqkAyQ/s72-w233-h400-c/Screenshot%202022-12-26%20at%209.01.46%20PM.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>sunnikmr8@gmail.com (www.projects-codes.blogspot.in)</author></item></channel></rss>