<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Fabiyi Ayomiposi on Medium]]></title>
        <description><![CDATA[Stories by Fabiyi Ayomiposi on Medium]]></description>
        <link>https://medium.com/@bema_fabiyi?source=rss-b382b895d676------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*wgDo5Qrv4rrQYI8I</url>
            <title>Stories by Fabiyi Ayomiposi on Medium</title>
            <link>https://medium.com/@bema_fabiyi?source=rss-b382b895d676------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 00:55:53 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@bema_fabiyi/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Building a Native Splash Screen in Flutter]]></title>
            <link>https://medium.com/@bema_fabiyi/building-a-native-splash-screen-in-flutter-b07dc09e518f?source=rss-b382b895d676------2</link>
            <guid isPermaLink="false">https://medium.com/p/b07dc09e518f</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[native-splash-screen]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[flutter-app-development]]></category>
            <dc:creator><![CDATA[Fabiyi Ayomiposi]]></dc:creator>
            <pubDate>Wed, 30 Sep 2026 07:51:17 GMT</pubDate>
            <atom:updated>2026-09-30T07:51:17.940Z</atom:updated>
            <content:encoded><![CDATA[<h3>Building Native Splash Screens in Flutter</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*Ays0DBQyTyQfiMOYOl0mkQ.jpeg" /></figure><p>First off, if you want to get straight to business and know how to make it work immediately, the tutorial starts <a href="#6cb7">here</a>.</p><p>But if you want to get a little behind the scenes, you can just keep reading.</p><p>A splash screen is a screen/canvas that shows before your actual app content comes up. <br>If you’re familiar with Duolingo, you’d know that when you open the app, the first thing you’d see for a while is the owl’s face, and on Instagram, the logo. Those are splash screens.</p><p>When you run your Flutter app, the first screen you’ll typically see for about a second is a blank white canvas, and it displays because your app hasn’t fully loaded yet.</p><p>Normally, you may want to create your own customised splash screen with Flutter, but don’t be shocked when the first thing you see is still that white canvas and then the splash screen you created coming up about a second later lol.</p><p>This happens because the splash screen is to be displayed while your app loads… and Flutter hasn’t loaded yet. <br>You can’t solve a problem that happens <strong>before Flutter starts</strong> using Flutter itself.</p><p>The solution? A Native Splash Screen.</p><p>Now you could go into the deep end of native code by setting up an XML layout file for Android and designing a Launch Screen Storyboard on Xcode for iOS.<br>But we’re not going to do that; we would be using the flutter_native_splash package instead, and this package would generate the native configurations we need for a native splash screen.</p><h3>Setting Up The <strong><em>flutter_native_splash</em></strong> Package</h3><p><strong>Step 1: Install the Package</strong></p><p>Open your terminal at the root of your project and run this command. This will add the package to your pubspec.yaml file and install it:</p><pre>flutter pub add flutter_native_splash</pre><p><strong>Step 2: Configure the Splash Screen</strong></p><p>Now it’s time to tell the package what to actually build. You can do this directly inside your pubspec.yaml file, but things can get pretty messy in there. <br>So instead, let&#39;s create a clean, dedicated file in your root project folder named native_splash.yaml and paste the configuration below(Feel free to tweak it).</p><pre>flutter_native_splash:<br>  android: true<br>  ios: true<br>  web: false<br><br>  color: &quot;#ffffff&quot; # Your splash screen background hex color<br>  image: &quot;assets/splash_logo.png&quot; # must be a PNG file</pre><p>By default, the package generates splash screens for Android, iOS and web, so the platform parameters give you control over which platforms you want to generate for.</p><p>There is also an optional branding parameter to which you’ll pass a PNG file. This would be at the bottom centre of the screen by default.</p><p>And if a plain colour isn&#39;t enough for your design, you can use background_image in place of color for more creative freedom.</p><h3>Platform-Specific Configurations and Theming</h3><p>The flutter_native_splash package also allows you to configure the splash screens based on the device’s theme. So if you want a different image or colour for light and dark modes, you would have something like this</p><pre>flutter_native_splash:<br># for light mode<br>  color: &quot;#fffbf8&quot;<br>  image: &quot;assets/images/logo.png&quot;<br><br># for dark mode  <br>  color_dark: &quot;#111111&quot;<br>  image_dark: &quot;assets/images/dark_logo.png&quot;</pre><p>And if you want to have different configurations for different platforms, it would be in this format</p><pre>flutter_native_splash:<br>  image_android: &quot;assets/images/logo.png&quot;<br>  image_dark_android: &quot;assets/images/dark_logo.png&quot;<br><br>  branding_ios: &quot;assets/images/brand_ios.png&quot;<br>  branding_dark_ios: &quot;assets/images/dark_brand_ios.png&quot;</pre><p>Keep in mind that platform-specific configurations override their corresponding general configuration.</p><h3>Configuring for Android 12+</h3><p>Now you might be wondering, “Why do Android 12+ need their own configurations?”<br>Well, that is because they are special people.</p><p>Starting with Android 12, a new splash screen system was introduced. This means that the splash screen is handled differently from previous Android versions, and you no longer have as much freedom over how it is displayed.</p><p>But don’t worryyyyy, since we’re using this package, you don’t need to break into much of a sweat.</p><p>To account for this, we just give Android 12 its own nested block in our file, as shown below</p><pre>flutter_native_splash:<br>  android: true<br>  ios: true<br>  web: false<br><br>  color: &quot;#fffbf8&quot;<br>...<br><br>  android_12:<br>    color: &quot;#fffbf8&quot;<br>    # if an image is not specified, the app&#39;s launcher icon is used by default<br>    image: &quot;assets/images/logo_android12.png&quot;<br>    color_dark: &quot;#111111&quot;<br>    # optional, useful if your logo needs to sit inside a solid, colored badge/background<br>    icon_background_color: &quot;#111111&quot;</pre><p>With the new splash screen system, Android treats your image as an icon and clips it into a circle. So you have to make sure that the most important elements of your image/logo fit into the constraints.</p><p>If you have an image/logo without a background, your image should be 1152×1152 px and fit into a circle 768px in diameter<br>If it does have a background, your image should be 960×960 px and fit into a circle 640px in diameter.</p><p>Now the icon can look tiny, so you may want to fill as much space as possible within the circle constraint.<br>Also worth noting that you can’t set a background_image for Android 12 and later.</p><h3>Splash!</h3><p>Now that you have all these set up, the next thing you do is to run the package’s generation command below</p><pre>dart run flutter_native_splash:create -p native_splash.yaml</pre><p>If you placed your configurations in pubspec.yaml, run</p><pre>dart run flutter_native_splash:create</pre><p>This will generate the native resources and configuration required by the platforms you enabled to display that splash screen before Flutter renders its first frame.<br>And whenever you make any changes to your configurations, you have to run this command again to update accordingly.</p><p>If you stop your app and run it now, you should be able to see the splash screen you just created rather than the white canvas.</p><p>For iOS, you may encounter an issue where you still briefly see the previous splash screen. This is due to iOS aggressively caching splash screens at a system level.<br>To fix it, you may have to completely delete the app from your simulator, restart it and run the app again for the changes to reflect.</p><p>If all went well, you just created a native splash screen in Flutter! <br>Yayyy, <em>plays fanfare 🎉</em></p><p>If this helped you, please leave a clap or claps, whichever you want 😂<br>And you can leave a comment too.</p><p>Peace. 🫶</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b07dc09e518f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter & Theming]]></title>
            <link>https://medium.com/@bema_fabiyi/my-summary-on-things-i-learnt-from-ch-25-of-flutter-engineering-2ed2a8aba3f8?source=rss-b382b895d676------2</link>
            <guid isPermaLink="false">https://medium.com/p/2ed2a8aba3f8</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[flutter-app-development]]></category>
            <category><![CDATA[flutter-ui]]></category>
            <dc:creator><![CDATA[Fabiyi Ayomiposi]]></dc:creator>
            <pubDate>Sat, 02 May 2026 19:37:25 GMT</pubDate>
            <atom:updated>2026-05-02T20:18:10.846Z</atom:updated>
            <content:encoded><![CDATA[<h4>My summary of + things I learnt from Ch. 25 of Flutter Engineering</h4><ul><li><strong>Theming is not just to make the app look good, it enhances collaboration.<br></strong>Effective theming makes it easier for multiple people to work on the same codebase. When theming is properly set up, a new dev would not need to be taught how to use custom wrapped and composed UI widgets to get the desired style. They can use the default widget with confidence that it has already been styled to match the app theme.</li><li>While <em>CupertinoApp</em> and <em>MaterialApp</em> were built to cater to Cupertino design (iOS) and Material design (Android) respectively, there’s only so much you can customise with the former. <em>MaterialApp</em> is more flexible and customisable.</li><li><strong>Okay, so here’s one that I genuinely didn’t know I could use till I read it in this book: <em>WidgetsApp</em>.</strong><br>Using <em>WidgetsApp,</em> you get a more granular control level and become responsible for managing many aspects of the app’s design, including theming, which is automatically handled in <em>MaterialApp</em> and <em>CupertinoApp.<br></em>To me, this does sound nice as I’d get even more customisation, BUT it also does sound like I’d get even more work <br>So unless necessary, I think I’d stick to having that pre-built theme structure.</li><li><strong>Theming makes applying universal changes easier, while also maintaining consistency in the app’s design.<br></strong>You want to change the app’s primary color? Just go to where you set up the theme data, rather than trying to find every place where you used it.</li><li><strong>You can create a color scheme based on an image’s dominant color.<br></strong>I didn’t know that you could do that this way in Flutter. <br>You just have to use the <em>ColorScheme.fromImageProvider()</em> method then pass it the image.<br>It’s especially good for when you want to display dynamic themes based on visual content.</li><li><strong>The <em>MaterialStateProperty</em> </strong><br>It allows you to change certain aspects of your widget based on its state or user interaction.<br>Use case? The color of a button changing when hovered or pressed.<br>So, you can define a color when the button is in its normal state and a different color when pressed.</li></ul><p>Simplified Example:</p><pre>            ElevatedButton(<br>              style: ButtonStyle(<br>                backgroundColor: MaterialStateProperty.resolveWith&lt;Color&gt;(<br>                  (<br>                    Set&lt;MaterialState&gt; states,<br>                  ) {<br>                    if (states.contains(MaterialState.pressed)) {<br>                      return Colors.green; // Color when the button is pressed<br>                    }<br>                    return Colors.blue; // Default color<br>                  },<br>                ),<br>              ),<br>              onPressed: () {},<br>              child: const Text(&#39;Elevated Button&#39;),<br>            ),</pre><ul><li><strong>The workflow &amp; steps to setting up MaterialApp Theming<br></strong>1. Determine the main colors of the application for light and dark mode.<br>2. Define light and dark color schemes based on these colors.<br>3. Define the overall textTheme and primaryTextTheme for your application.<br>4. Define component theme styles so they match your design goal.<br>5. Add a theme extension with any semantics and additional colors you need.<br>6. Add a theme extension with any additional content text styles you need.<br>7. Add theme extensions for more advanced custom components that need their themes.</li></ul><p>You typically would want a brand or identity color set as the <em>ColorScheme.primary</em>,<em> </em>while supporting colors can be used as secondary or tertiary color. <br>If you have only one supporting color it’s recommended to prefer using tertiary color in the color scheme over secondary color.<br>Why? The secondary palette in the Material-3 color system is typically a more muted version of the primary palettes. It does not have to be, but the default color mappings on components assume this is the case in some mappings.</p><p>Reading this book has not only taught me how to handle theming and colors in Flutter. It has also changed my approach to app development in general.</p><p>If you haven’t already, I’d recommend you read <strong>Flutter Engineering by Majid Hajian.</strong></p><p>Thanks for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2ed2a8aba3f8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>