<?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 Etornam Sunu Bright on Medium]]></title>
        <description><![CDATA[Stories by Etornam Sunu Bright on Medium]]></description>
        <link>https://medium.com/@etornam-sunu?source=rss-56915b42c43c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ibYZeyMsnuSYLkf0xvM6ug.jpeg</url>
            <title>Stories by Etornam Sunu Bright on Medium</title>
            <link>https://medium.com/@etornam-sunu?source=rss-56915b42c43c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 23:21:14 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@etornam-sunu/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[Closing the Final Page of 2025: A Manifesto of Gratitude and Clarity]]></title>
            <link>https://etornam-sunu.medium.com/closing-the-final-page-of-2025-a-manifesto-of-gratitude-and-clarity-849b5e0ffce2?source=rss-56915b42c43c------2</link>
            <guid isPermaLink="false">https://medium.com/p/849b5e0ffce2</guid>
            <category><![CDATA[tech-in-africa]]></category>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[life-lessons]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[2025-review]]></category>
            <dc:creator><![CDATA[Etornam Sunu Bright]]></dc:creator>
            <pubDate>Wed, 31 Dec 2025 09:22:41 GMT</pubDate>
            <atom:updated>2025-12-31T09:22:41.610Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Why the way we end the year matters just as much as how we start it.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NjpsvBVNfargRW91afKlqA.png" /><figcaption>image generated using Nano banana</figcaption></figure><p>Today is the last day of 2025.</p><p>Not just because the calendar on my screen says so, but because I feel it. I feel it in the quiet moments between commits, the filtered light of the afternoon, and the intentional pauses between doing and becoming.</p><p>As the world outside prepares for fireworks, champagne, and countdowns, I found myself sitting in a stillness that felt less like an ending and more like a deep breath. I spent the day reflecting on something less dramatic than a New Year’s resolution, but far more profound: <strong>the beauty of simply showing up</strong>.</p><h3>The Microcosm of Today</h3><p>If you look closely, one day can be a map for the whole year.</p><p>Today wasn’t a headline-worthy day. There were no keynote stages, no massive product launches, and no viral posts. Yet, it carried a specific weight, a texture, that I want to remember long after the clock strikes midnight.</p><p>I spent today doing what I’ve done throughout 2025: building, thinking, recalibrating, and finding small ways to make the future more meaningful than the past.</p><ul><li>I answered messages with sincerity, not just speed.</li><li>I wrote notes I intend to act on, rather than letting ideas die in the backlog.</li><li>I touched lines of code that will shape something bigger than myself.</li><li>I finally closed tabs in my browser that I no longer needed, a symbolic clearing of mental clutter.</li></ul><p>But more importantly, I checked in with myself. Not the version of me expected to achieve KPIs. Not the version that delivers talks or ships features. But the version that is human, curious, tired sometimes, and driven always.</p><p>And that, for me, was enough.</p><h3>A Year in Review: The Update Log</h3><p>If I were to look at the “changelog” of my life for 2025, it would be a masterclass in evolution.</p><p>I learned that being early isn’t as important as being ready. In an industry obsessed with speed, I found that the best code and the best decisions are the ones written with a clear head, not a frantic one.</p><p>I learned that efficiency beats effort, but only when intention guides both. Hard work is a virtue, but directed work is a superpower.</p><p>I learned that community isn’t built by speaking; it is built by listening. The strongest bridges I built this year weren’t formed when I was holding the microphone, but when I was taking notes on what others needed.</p><p>I embraced new tools and questioned old assumptions. I wrote papers that challenged me and rewrote code that humbled me. I mentored bright minds and was mentored by even brighter ones. I failed at things I don’t talk about on social media, and I succeeded at things that surprised even me.</p><p>But the true milestone of 2025 wasn’t the work I shipped; it was the mindset I refined.</p><h3>Gratitude to the Invisible Architects</h3><p>No one compiles their life alone. To every person who made 2025 softer, sharper, kinder, and wiser for me, thank you.</p><ul><li>To the friends who celebrated me loudly when I won.</li><li>To the ones who corrected me gently when I drifted.</li><li>To the teammates who trusted my instincts even when the path wasn’t obvious.</li><li>To the strangers whose random comments or open-source contributions nudged my ideas into existence.</li><li>To the readers who take the time to consume thoughts like these, you complete the loop of expression.</li></ul><p>And to technology itself, thank you for constantly humbling me with how much more there is to learn. You remind me daily that I am a perpetual student.</p><h3>The Art of Subtraction (Letting Go)</h3><p>Growth requires pruning. As the year ends, I’m not just adding to my list; I am subtracting. I am choosing to release:</p><ul><li>The need to have every answer immediately.</li><li>The pressure to make every moment monumental.</li><li>The habit of measuring myself against timelines that aren’t mine.</li><li>The fear of pivoting when purpose asks me to change direction.</li><li>The illusion that impact must always be loud.</li></ul><p><em>Some things are better felt than announced. Some code runs better in the background.</em></p><h3>Welcoming 2026 With Intention</h3><p>I’m not walking into 2026 hoping for change. I’m walking into it carrying evidence that I <em>can</em> change.</p><p>I am entering this new year:</p><ul><li>With more curiosity than certainty.</li><li>With more questions than conclusions.</li><li>With more empathy than ego.</li><li>With more craft than chaos.</li><li>With more grace than grind.</li></ul><h3>Final Words for 2025</h3><p>You were challenging. You were generous. You were necessary.</p><p>And today, your final lesson was simple: <strong>Gratitude turns reflection into direction</strong>.</p><p>So here I stand, at the edge of a new year, appreciating the road behind me and preparing for the one ahead, with a full heart, a clear mind, and a ready spirit.</p><p>🎉 See you in 2026. But first… Thank you, 2025 🫡.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=849b5e0ffce2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Prompt-Driven Development: The Next Evolution in Software Engineering]]></title>
            <link>https://etornam-sunu.medium.com/prompt-driven-development-the-next-evolution-in-software-engineering-72580e87bc2b?source=rss-56915b42c43c------2</link>
            <guid isPermaLink="false">https://medium.com/p/72580e87bc2b</guid>
            <category><![CDATA[prompt]]></category>
            <category><![CDATA[vibe-coding]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[prompt-engineering]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Etornam Sunu Bright]]></dc:creator>
            <pubDate>Tue, 24 Jun 2025 12:02:53 GMT</pubDate>
            <atom:updated>2025-06-24T12:02:53.771Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nBjFVgjNtBwvDD8q" /><figcaption>Photo by <a href="https://unsplash.com/@max_duz?utm_source=medium&amp;utm_medium=referral">Max Duzij</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>I. Introduction: The Evolution of Development</h3><p>The journey of software development has been a continuous evolution, marked by shifts in methodologies, tools, and paradigms. From the structured rigidity of the Waterfall model in the mid-20th century, through the iterative flexibility of Agile, to the rapid deployment capabilities championed by DevOps, each era has sought to enhance efficiency, reduce errors, and accelerate time-to-market. These advancements have primarily focused on refining human processes and optimizing the interaction between developers and machines.</p><p>However, a new and profoundly transformative force has emerged: Large Language Models (LLMs) and generative Artificial Intelligence. These AI systems, capable of understanding, generating, and manipulating human language with astonishing fluency, are not just another tool; they represent a fundamental shift in how we interact with technology, and critically, how we create it.</p><p>This article introduces Prompt-Driven Development (PDD), a burgeoning paradigm that leverages the power of LLMs to revolutionize the entire software lifecycle. By enabling developers to communicate their intentions in natural language, PDD promises to accelerate design, coding, testing, and deployment, offering unprecedented levels of speed, efficiency, and perhaps, even creativity in the software engineering domain. We are at the cusp of an era where software practically writes itself, guided by the nuanced instructions of human ingenuity.</p><h3>II. What is Prompt-Driven Development?</h3><p>At its core, Prompt-Driven Development (PDD) is an innovative approach to software engineering where natural language prompts are used to guide AI models, primarily Large Language Models (LLMs), in generating, modifying, and analyzing code and other development artifacts. It represents a significant departure from traditional explicit coding, shifting the focus from meticulously writing every line of code to articulating high-level, intent-based instructions that an AI can then translate into functional software components.</p><p>The fundamental principle behind PDD is simple yet powerful: rather than telling a computer how to perform every step, you tell an AI what you want to achieve. This paradigm leverages the LLM’s sophisticated understanding of human language and its vast training data (including colossal amounts of code) to infer intent, fill in details, and produce executable code or valuable insights.</p><p>Key components that make PDD possible include:</p><ul><li>Sophisticated Large Language Models: The backbone of PDD are advanced LLMs like OpenAI’s GPT-4o, Anthropic’s Claude Sonnet 4, and Google’s Gemini 2.5.</li><li>Effective Prompt Engineering: Crafting precise, clear, and comprehensive natural language instructions to elicit the desired output from an LLM.</li><li>Integration with Existing Development Tools: Seamless integration into IDEs, version control, testing frameworks, and CI/CD pipelines.</li></ul><p>In essence, PDD empowers developers to become “AI whisperers,” directing intelligent agents to construct software components, troubleshoot issues, and document their work, thereby amplifying human capabilities and accelerating the pace of innovation.</p><h3>III. The Mechanics of Prompt-Driven Development</h3><p><strong>Prompt Engineering</strong>: The Language of Intent</p><ul><li>Clear, concise, and specific prompts are paramount.</li><li>Techniques include few-shot learning, role-playing, defining constraints, and providing examples.</li><li>Iterative prompting is common to refine and guide LLM outputs.</li></ul><p><strong>Code Generation</strong>: From Concept to Constructor</p><ul><li>Automates boilerplate, utility functions, components, and code scaffolds.</li><li>Translates user stories and design specs into functional code.</li></ul><p><strong>Code Refinement and Optimization</strong></p><ul><li>Suggests improvements, idiomatic patterns, and performance tweaks.</li><li>Supports refactoring to enhance code readability and maintainability.</li></ul><p><strong>Testing and Debugging</strong></p><ul><li>Generates comprehensive unit tests.</li><li>Identifies bugs and explains error messages.</li></ul><p><strong>Documentation and Design</strong></p><ul><li>Generates inline documentation, API specs, and architecture overviews.</li><li>Assists with system design and architectural planning.</li></ul><h3>IV. Use Cases and Applications of PDD</h3><ul><li>Rapid Prototyping: Generate full-stack MVPs within hours.</li><li>Boilerplate Reduction: Automate repetitive project scaffolding.</li><li>Legacy Code Modernization: Refactor or translate outdated codebases.</li><li>Learning and Onboarding: Aid junior devs with code explanations.</li><li>Cross-Language Development: Convert code between programming languages.</li><li>Specialized Domains: Generate niche code for finance, science, ML, etc.</li></ul><h3>V. Advantages of Prompt-Driven Development</h3><ul><li>Accelerated Development Cycles</li><li>Increased Productivity and Focus on Innovation</li><li>Reduced Cognitive Load</li><li>Improved Code Quality</li><li>Enhanced Accessibility for Non-Developers</li><li>Consistent Code Style and Best Practices</li></ul><h3>VI. Challenges and Limitations</h3><ul><li>Prompt Quality Dependency: Garbage in, garbage out.</li><li>Over-reliance Risk: Degradation of core programming skills.</li><li>Hallucinations: Potentially flawed or fabricated code.</li><li>Security &amp; IP Concerns: Risks of exposing sensitive data.</li><li>Debugging AI Code: Understanding complex auto-generated logic.</li><li>Ethical Issues: Bias, IP rights, job displacement.</li></ul><h3>VII. Best Practices for Effective PDD</h3><ul><li>Master Prompt Engineering (clarity, context, refinement)</li><li>Maintain Human-in-the-Loop for validation and quality</li><li>Start with Small, Contained Use Cases</li><li>Understand Underlying Technologies and Models</li><li>Choose Tools that Integrate with Existing Workflows</li><li>Adopt Strong Testing and Security Protocols</li><li>Continuously Learn and Adapt to AI Evolution</li></ul><h3>VIII. The Future of Prompt-Driven Development</h3><ul><li>Smarter, Specialized LLMs</li><li>Seamless IDE Integration</li><li>Learning Feedback Loops</li><li>AI Project Managers and Architects</li><li>AI-Native Methodologies</li><li>Role Evolution of Developers</li><li>Natural Language to No-Code Systems</li></ul><p>The evolution toward more intelligent and autonomous development assistants is inevitable. Prompt-Driven Development will act as the bridge between today’s code-heavy workflows and tomorrow’s intent-based systems.</p><h3>IX. Conclusion</h3><p>Prompt-Driven Development represents a fundamental shift in how software is conceived, built, and maintained. Rather than manually writing every function, developers can now focus on articulating goals, solving problems, and curating the outputs of AI collaborators.</p><p>As Ghana and the global developer ecosystem embrace this new paradigm, it is vital to approach PDD not as a shortcut but as an augmentation. AI will not replace developers — but developers who use AI effectively may eventually replace those who don’t.</p><p>The future of coding is not just about writing syntax. It’s about communicating ideas to intelligent systems and shaping the digital world through thoughtful conversation.</p><p>🎧 Listen to my podcast: <a href="https://open.spotify.com/show/2DgsGoWsjUOk79WG6kkKEI">Spotify</a><br>📄 Read my research: <a href="https://etornam.dev/#research">etornam.dev/research</a><br>🔗 Connect on LinkedIn: <a href="https://www.linkedin.com/in/etornam-sunu/">Etornam Sunu</a></p><p><em>If you have any specific topic you would like me to write on, leave your suggestions in the comment section, and also if you need any clarifications on this topic, do well to reach out to me on X(Twitter)</em> <a href="https://twitter.com/_iamEtornam"><em>@_iamEtornam</em></a><em>.</em></p><p><em>Originally published on </em><a href="https://iametornam.hashnode.dev/prompt-driven-development-the-next-evolution-in-software-engineering"><em>hashnode</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=72580e87bc2b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Route Awareness in Flutter: Leveraging the RouteAware Class]]></title>
            <link>https://etornam-sunu.medium.com/understanding-route-awareness-in-flutter-leveraging-the-routeaware-class-f8e39fea292e?source=rss-56915b42c43c------2</link>
            <guid isPermaLink="false">https://medium.com/p/f8e39fea292e</guid>
            <category><![CDATA[routing]]></category>
            <category><![CDATA[navigator]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[events]]></category>
            <category><![CDATA[go-router]]></category>
            <dc:creator><![CDATA[Etornam Sunu Bright]]></dc:creator>
            <pubDate>Tue, 08 Apr 2025 16:25:59 GMT</pubDate>
            <atom:updated>2025-04-08T16:25:59.323Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VFWy-ekX7xK1SbzShKFoDg.png" /></figure><p>In Flutter development, managing navigation and understanding a widget’s visibility within the navigation stack is crucial for building dynamic and responsive user interfaces. The <strong>RouteAware class</strong> in the Flutter widgets library provides a mechanism for objects to be notified of changes to the Navigator&#39;s route history. This article delves into the purpose and functionality of the RouteAware class, drawing directly from the official Dart API documentation.</p><p><strong>What is RouteAware?</strong></p><p>The RouteAware class is defined as an <strong>abstract mixin</strong> that serves as an <strong>interface for objects that need to be aware of their current </strong><strong>Route</strong>. It is specifically designed to be used in conjunction with <strong>RouteObserver</strong>, a class that listens to route changes in a Navigator. By mixing in RouteAware into a widget and registering it with a RouteObserver, that widget can receive callbacks whenever its associated route&#39;s visibility changes.</p><p><strong>Key Features and Functionality:</strong></p><p>The RouteAware class provides several methods that are called at different points in a route&#39;s lifecycle:</p><ul><li><strong>didPop()</strong>: This method is invoked <strong>when the current route has been popped off the navigation stack</strong>. This signifies that the route is no longer visible, and the user has navigated back to the previous screen.</li><li><strong>didPopNext()</strong>: This method is called <strong>when the route above the current route has been popped off</strong>, and consequently, <strong>the current route becomes visible again</strong>. This is useful for scenarios where a widget needs to react when it reappears after another route is dismissed.</li><li><strong>didPush()</strong>: This method is triggered <strong>when the current route has been pushed onto the navigation stack</strong>. This indicates that the route has become the top-most route and is now visible to the user.</li><li><strong>didPushNext()</strong>: This method is invoked <strong>when a new route has been pushed on top of the current route</strong>, meaning <strong>the current route is no longer visible</strong>. Widgets using this callback can perform actions when they are obscured by a new route.</li></ul><p><strong>Other Members:</strong></p><p>Besides these lifecycle methods, the RouteAware class also includes the following inherited members:</p><ul><li><strong>hashCode</strong>: This property provides the hash code for the RouteAware object.</li><li><strong>runtimeType</strong>: This property gives a representation of the runtime type of the object.</li><li><strong>noSuchMethod(Invocation invocation)</strong>: This inherited method is invoked when a nonexistent method or property is accessed.</li><li><strong>toString()</strong>: This inherited method returns a string representation of the RouteAware object.</li><li><strong>operator ==(Object other)</strong>: This inherited operator defines how equality is checked for RouteAware objects.</li></ul><p>Examples:</p><pre>import &#39;package:flutter/material.dart&#39;;<br><br>// Step 1: Create your route observer<br>final RouteObserver&lt;PageRoute&gt; routeObserver = RouteObserver&lt;PageRoute&gt;();<br><br>void main() {<br>  runApp(MyApp());<br>}<br><br>class MyApp extends StatelessWidget {<br>  @override<br>  Widget build(BuildContext context) {<br>    return MaterialApp(<br>      // Step 2: Register the route observer in MaterialApp<br>      navigatorObservers: [routeObserver],<br>      home: HomePage(),<br>      routes: {<br>        &#39;/details&#39;: (context) =&gt; DetailsPage(),<br>      },<br>    );<br>  }<br>}<br><br>class HomePage extends StatelessWidget {<br>  @override<br>  Widget build(BuildContext context) {<br>    return Scaffold(<br>      appBar: AppBar(title: Text(&#39;Home Page&#39;)),<br>      body: Center(<br>        child: ElevatedButton(<br>          child: Text(&#39;Go to Details&#39;),<br>          onPressed: () {<br>            Navigator.of(context).pushNamed(&#39;/details&#39;);<br>          },<br>        ),<br>      ),<br>    );<br>  }<br>}<br><br>// Step 3: Create a state class that implements RouteAware<br>class DetailsPage extends StatefulWidget {<br>  @override<br>  _DetailsPageState createState() =&gt; _DetailsPageState();<br>}<br><br>class _DetailsPageState extends State&lt;DetailsPage&gt; with RouteAware {<br>  @override<br>  void didChangeDependencies() {<br>    super.didChangeDependencies();<br>    // Step 4: Subscribe to the route observer<br>    routeObserver.subscribe(this, ModalRoute.of(context)!);<br>  }<br><br>  @override<br>  void dispose() {<br>    // Step 5: Unsubscribe from the route observer<br>    routeObserver.unsubscribe(this);<br>    super.dispose();<br>  }<br><br>  // Step 6: Implement RouteAware callbacks<br>  @override<br>  void didPush() {<br>    // Called when this route is pushed onto navigator and page appears<br>    print(&#39;Details page didPush: page is now visible&#39;);<br>    // You could start animations, fetch data, etc.<br>  }<br><br>  @override<br>  void didPopNext() {<br>    // Called when the route on top of this one is popped<br>    print(&#39;Details page didPopNext: returning to this page&#39;);<br>    // You could refresh data, restart animations, etc.<br>  }<br><br>  @override<br>  void didPushNext() {<br>    // Called when a new route is pushed on top of this one<br>    print(&#39;Details page didPushNext: another page is now visible&#39;);<br>    // You could pause animations, save state, etc.<br>  }<br><br>  @override<br>  void didPop() {<br>    // Called when this route is popped off the navigator<br>    print(&#39;Details page didPop: this page is being removed&#39;);<br>    // You could save user data, stop services, etc.<br>  }<br><br>  @override<br>  Widget build(BuildContext context) {<br>    return Scaffold(<br>      appBar: AppBar(title: Text(&#39;Details Page&#39;)),<br>      body: Center(<br>        child: Text(&#39;This is a RouteAware page&#39;),<br>      ),<br>    );<br>  }<br>}</pre><p><strong>In Summary:</strong></p><p>The RouteAware class is a powerful tool in Flutter for creating widgets that are sensitive to navigation events. By implementing the RouteAware interface and working with a RouteObserver, developers can build more sophisticated UIs that react intelligently to route transitions, such as pausing animations, releasing resources, or updating their state based on their visibility within the application&#39;s navigation flow. The methods provided by RouteAware offer precise callbacks for various stages of a route&#39;s lifecycle, enabling fine-grained control over a widget&#39;s behavior in response to navigation changes.</p><p><em>And that’s all for now. If you have any specific topic you would like me to write on, leave your suggestions in the comment section, and also if you need any clarifications on this topic, do well to reach out to me on X(Twitter) </em><a href="https://x.com/_iamEtornam"><em>@_iamEtornam</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f8e39fea292e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Locking Down Your Mobile App: A Guide to Secure Biometric Authentication ]]></title>
            <link>https://etornam-sunu.medium.com/locking-down-your-mobile-app-a-guide-to-secure-biometric-authentication-7c58cbaad420?source=rss-56915b42c43c------2</link>
            <guid isPermaLink="false">https://medium.com/p/7c58cbaad420</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[biometrics]]></category>
            <category><![CDATA[mobile]]></category>
            <dc:creator><![CDATA[Etornam Sunu Bright]]></dc:creator>
            <pubDate>Tue, 17 Dec 2024 12:17:10 GMT</pubDate>
            <atom:updated>2025-01-11T06:37:46.613Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2NzWFdPYkE_HH4N1KUR_WQ.jpeg" /><figcaption>AI-generated image with Gemini</figcaption></figure><p>Biometric authentication is a fantastic way to boost user experience in mobile apps, offering a quick and easy login process. But, if not implemented correctly, it can open a Pandora’s Box of security vulnerabilities. I’ve seen too many developers make the critical mistake of storing user credentials directly on the device — a huge no-no! 🚫 This article outlines a secure approach to biometric authentication, avoiding this dangerous practice.</p><p><strong>The Golden Rule: Never Store User Credentials on the Device!</strong> 🙅‍♀️</p><p>Instead of storing sensitive information, we’ll use a more robust method involving hashes and device IDs. Here’s the breakdown:</p><p><strong>1. Generate and Securely Store a Hash 🔑</strong></p><p>This is the foundation of our secure system:</p><ul><li>When users opt for biometric login, we generate a unique hash specifically for their account. Think of it as a digital fingerprint. 👆</li><li>This hash is then encrypted and securely stored. On iOS, this is done using the Keychain; on Android, it’s the Keystore. For Flutter developers, the Flutter Secure Storage package provides a seamless solution. 📦</li><li>Critically, this <em>encrypted</em> hash is also sent to your backend server for secure storage. This is where the real security lies. 🛡️</li></ul><p><strong>2. Setting Up a Secure Biometric Login Endpoint 📡</strong></p><p>Your backend needs a dedicated endpoint for biometric logins. This endpoint should accept two crucial pieces of information:</p><ul><li>The encrypted hash (the unique account identifier).</li><li>The device ID (to verify the device being used).</li></ul><p><strong>3. Validation During Subsequent Logins ✅</strong></p><p>When the user tries to log in using biometrics:</p><p>a. The app fetches the encrypted hash from secure storage. b. This hash, along with the device ID, is sent to the backend’s biometric login endpoint.</p><p>On the backend, thorough validation takes place:</p><p>I. <strong>Hash Match:</strong> Does the received hash match the securely stored for this account? 🤔 II. <strong>Device ID Match:</strong> Does the received device ID match the one associated with the user’s account? 📱</p><p><strong>4. Handling Edge Cases Gracefully ⚠️</strong></p><p>Robust error handling is essential:</p><ul><li><strong>Successful Login:</strong> If both the hash and device ID match, grant the user access to the app. 🎉</li><li><strong>Incorrect Hash:</strong> If the hash doesn’t match, reject the login. ❌</li><li><strong>Incorrect Device ID:</strong> This requires a bit more nuance:</li><li>If the new device ID isn’t associated with <em>any</em> account, allow the user to register the device and proceed. This could be a new phone or a fresh install. 🆕</li><li>If the new device ID is associated with <em>another</em> account, reject the login. This prevents unauthorized access. ⛔</li></ul><p><strong>Why This Matters 🤔</strong></p><p>Biometric authentication is all about convenience, but security should never be compromised. By using hashes and device IDs, we ensure that actual login credentials are never stored on the device, significantly reducing the risk of data breaches. This approach provides a robust and secure biometric login experience. 💪</p><p><strong>What are your thoughts?</strong> Do you use any other methods for secure biometric authentication? I’d love to hear your insights! 👇</p><p><em>Credit: Initial publication by Ikenna Umeh on </em><a href="https://www.linkedin.com/posts/ikenna-umeh-stan_mobileappdevelopment-flutter-security-activity-7274724221044281344-zBH9?utm_source=share&amp;utm_medium=member_ios"><em>LinkedIn</em></a><em>. Improved and revised.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7c58cbaad420" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AsyncMemoizer: Caching Futures for Performance Optimization in Flutter]]></title>
            <link>https://etornam-sunu.medium.com/asyncmemoizer-caching-futures-for-performance-optimization-in-flutter-7c5fced64239?source=rss-56915b42c43c------2</link>
            <guid isPermaLink="false">https://medium.com/p/7c5fced64239</guid>
            <category><![CDATA[optimization]]></category>
            <category><![CDATA[http-request]]></category>
            <category><![CDATA[async]]></category>
            <category><![CDATA[performance]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Etornam Sunu Bright]]></dc:creator>
            <pubDate>Mon, 04 Mar 2024 14:03:25 GMT</pubDate>
            <atom:updated>2024-03-04T14:46:19.164Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*klhKwlr6rILSmbNaaqK2gg.png" /></figure><p><strong>Tired of redundant API calls and sluggish performance?</strong> <strong>Flutter developers, rejoice!</strong> AsyncMemoizer is your secret weapon for optimizing app speed and efficiency. This powerful tool caches the results of asynchronous functions, ensuring smooth performance and minimal resource usage. This article delves into all the important details of this powerful helper, explaining its purpose, functionalities, and effective use in your Flutter projects.</p><h3>What is AsyncMemoizer?</h3><p>AsyncMemoizer is a class that helps you <strong>cache the results of asynchronous functions</strong>. It ensures that the function runs only once for a given set of inputs, even if it&#39;s called multiple times. This can significantly improve performance by avoiding redundant network calls or expensive calculations.</p><h3>Key Features of AsyncMemoizer:</h3><ul><li><strong>Caching:</strong> Stores the result of the first successful execution for future calls with the same arguments.</li><li><strong>Thread-safety:</strong> Handles concurrent calls safely, preventing race conditions and unexpected behaviour.</li><li><strong>Error Handling:</strong> Propagates errors from the original function, allowing proper response to failures.</li><li><strong>Customisation:</strong> Options like clearing cache, setting key generation functions, and providing error handlers offer flexibility.</li></ul><h3>Benefits of Using AsyncMemoizer:</h3><ul><li><strong>Performance Improvement:</strong> Reduces redundant computations and network calls, leading to faster app responsiveness.</li><li><strong>Efficiency:</strong> Minimises resource usage by avoiding unnecessary work.</li><li><strong>Maintainability:</strong> Simplifies code by handling caching logic internally.</li></ul><h3>When to Use AsyncMemoizer:</h3><ul><li><strong>API calls with static data:</strong> If the API response doesn’t change frequently, cache it to avoid unnecessary network requests.</li><li><strong>Expensive calculations:</strong> Memoize the results of complex calculations to avoid recalculating them for the same inputs.</li><li><strong>Data fetching in widgets:</strong> Use it with FutureBuilder or similar widgets to prevent redundant data fetching on rebuilds.</li></ul><h3>How to Use AsyncMemoizer:</h3><ol><li><strong>Import the package:</strong></li></ol><pre>import &#39;package:async/async.dart&#39;;<br>import &#39;package:http/http.dart&#39;;<br>import &#39;dart:developer&#39;;</pre><p><strong>2. Create a function that makes a network call:</strong></p><pre>Future&lt;String&gt; fetchDataFromApi() async {<br>  // Simulate an API call that takes 2 seconds<br>  final response = await get(Uri.parse(&#39;https://catfact.ninja/fact&#39;));<br><br>  if (response.statusCode == 200) {<br>    return response.body;<br>  } else {<br>    throw Exception(&#39;Failed to load data from API&#39;);<br>  }<br>}</pre><p>3. <strong>Initialise </strong>AsyncMemoizer and Stopwatch</p><pre> // Create an AsyncMemoizer to cache the result of fetchDataFromApi<br>  final memoizer = AsyncMemoizer&lt;String&gt;();<br><br>// Create a stopwatch to measure time<br>// We are using the Stopwatch to measure the time taken to fetch the data.<br>  final stopwatch = Stopwatch()..start();</pre><p>4. <strong>Call</strong> runOnce <strong>method on</strong> AsyncMemoizer <strong>that accepts our</strong> fetchDataFromApi <strong>function</strong></p><pre>  // Call the memoizer to fetch data<br>  String data1 = await memoizer.runOnce(fetchDataFromApi);<br><br>  log(&#39;data1: $data1&#39;,name: &#39;memoizer&#39;); // Output: cats facts<br><br><br>  final firstCallTime = stopwatch.elapsed;<br><br>  log(&quot;First call: $data1 (took ${firstCallTime.inMilliseconds}ms)&quot;,name: &#39;memoizer&#39;);<br><br>  // Reset the stopwatch for the second call<br>  stopwatch.reset();</pre><p>5. <strong>Call</strong> runOnce method on AsyncMemoizer that accepts our fetchDataFromApi function and returns as data2</p><pre>  // Call the memoizer again, but it will use the cached result<br>  String data2 = await memoizer.runOnce(fetchDataFromApi);<br><br>  log(&#39;data2: $data2&#39;,name: &#39;memoizer&#39;); // Output: Data from API (almost instantaneous)<br><br>  final secondCallTime = stopwatch.elapsed;<br><br>  log(&quot;Second call: $data2 (took ${secondCallTime.inMilliseconds}ms)&quot;,name: &#39;memoizer&#39;);<br><br>  // Check if the data is the same<br>  log(&#39;data1 == data2: ${data1 == data2}&#39;, name: &#39;memoizer&#39;); // Output: true</pre><p>The logs will look something like this:</p><pre>[memoizer] data1: {&quot;fact&quot;:&quot;A female cat is called a queen or a molly.&quot;,&quot;length&quot;:42}<br>[memoizer] First call: {&quot;fact&quot;:&quot;A female cat is called a queen or a molly.&quot;,&quot;length&quot;:42} (took 723ms)<br>[memoizer] data2: {&quot;fact&quot;:&quot;A female cat is called a queen or a molly.&quot;,&quot;length&quot;:42}<br>[memoizer] Second call: {&quot;fact&quot;:&quot;A female cat is called a queen or a molly.&quot;,&quot;length&quot;:42} (took 0ms)<br>[memoizer] data1 == data2: true</pre><p>You will notice the second API call took <em>0ms </em>to complete.</p><h3>Important Considerations:</h3><ul><li><strong>Cache Invalidation:</strong> If the cached data becomes outdated, consider mechanisms to clear the cache or update it automatically.</li><li><strong>Thread Safety:</strong> Ensure multi-threaded environments access the memoizer safely, especially when using custom key generation functions.</li><li><strong>Memory Usage:</strong> Large caches can consume memory, so use it judiciously and consider eviction strategies.</li></ul><p>The complete code below:</p><pre>import &#39;dart:developer&#39;;<br>import &#39;package:async/async.dart&#39;;<br>import &#39;package:http/http.dart&#39;;<br><br>Future&lt;String&gt; fetchDataFromApi() async {<br>  final response = await get(Uri.parse(&#39;https://catfact.ninja/fact&#39;));<br><br>  if (response.statusCode == 200) {<br>    return response.body;<br>  } else {<br>    throw Exception(&#39;Failed to load data from API&#39;);<br>  }<br>}<br><br>void main() async {<br>  // Create an AsyncMemoizer to cache the result of fetchDataFromApi<br>  final memoizer = AsyncMemoizer&lt;String&gt;();<br><br>  // Create a stopwatch to measure time<br>  final stopwatch = Stopwatch()..start();<br><br>  // Call the memoizer to fetch data<br>  String data1 = await memoizer.runOnce(fetchDataFromApi);<br>  log(&#39;data1: $data1&#39;,<br>      name: &#39;memoizer&#39;); // Output: Data from API (takes 2 seconds)<br><br>  final firstCallTime = stopwatch.elapsed;<br><br>  log(&quot;First call: $data1 (took ${firstCallTime.inMilliseconds}ms)&quot;,<br>      name: &#39;memoizer&#39;);<br><br>  // Reset the stopwatch for the second call<br>  stopwatch.reset();<br><br>  // Call the memoizer again, but it will use the cached result<br>  String data2 = await memoizer.runOnce(fetchDataFromApi);<br>  log(&#39;data2: $data2&#39;,<br>      name: &#39;memoizer&#39;); // Output: Data from API (almost instantaneous)<br><br>  final secondCallTime = stopwatch.elapsed;<br><br>  log(&quot;Second call: $data2 (took ${secondCallTime.inMilliseconds}ms)&quot;,<br>      name: &#39;memoizer&#39;);<br><br>  // Check if the data is the same<br>  log(&#39;data1 == data2: ${data1 == data2}&#39;, name: &#39;memoizer&#39;); // Output: true<br>}</pre><p>By understanding AsyncMemoizer and its capabilities, you can optimize your Flutter applications by efficiently caching asynchronous operations and enhancing performance. Remember to use it strategically, considering thread safety, cache invalidation, and memory usage for optimal results.</p><p>I hope this comprehensive article provides valuable insights for Flutter developers/Engineers and anyone looking to improve their app&#39;s performance using AsyncMemoizer.</p><p><em>And that’s all for now. If you have any specific topic you would like me to write on, leave your suggestions in the comment section and also if you need any clarifications on this topic, do well to reach out to me on X(Twitter) </em><a href="https://twitter.com/_iamEtornam"><em>@_iamEtornam</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7c5fced64239" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sending Push Notifications to the iOS Simulator: A Comprehensive Guide]]></title>
            <link>https://etornam-sunu.medium.com/sending-push-notifications-to-the-ios-simulator-a-comprehensive-guide-cad77d1a6515?source=rss-56915b42c43c------2</link>
            <guid isPermaLink="false">https://medium.com/p/cad77d1a6515</guid>
            <category><![CDATA[xcode]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[push-notification]]></category>
            <dc:creator><![CDATA[Etornam Sunu Bright]]></dc:creator>
            <pubDate>Thu, 15 Feb 2024 10:49:37 GMT</pubDate>
            <atom:updated>2024-02-15T10:49:37.124Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qtio5sFf0PlKR_3KJxbuVQ.png" /></figure><p><strong>Introduction</strong></p><p>Testing push notifications within your iOS app development workflow is crucial. While real-device testing is ideal, utilizing the iOS Simulator offers a convenient and controlled environment for initial testing. This article explores various methods to send push notifications directly to your app running on the iOS Simulator.</p><p><strong>Prerequisites</strong></p><ul><li>A running instance of Xcode with your iOS app project open.</li><li>An active Apple Developer account and a valid push notification certificate configured.</li><li>Basic understanding of JSON formatting.</li></ul><p><strong>Methods for Sending Push Notifications:</strong></p><p><strong>1. Drag and Drop (Payload File):</strong></p><p>a. Create a JSON file containing a valid Apple Push Notification Service (APNs) payload structure. Ensure it includes the “aps” key with necessary content and a “Simulator Target Bundle” string matching your app’s bundle identifier.</p><pre>{<br>    &quot;Simulator Target Bundle&quot;: &quot;com.sourcestechnologies.edna&quot;,<br>    &quot;aps&quot; : {<br>       &quot;alert&quot; : {<br>            &quot;title&quot; : &quot;You have a new connection&quot;,<br>            &quot;body&quot; : &quot;Anita has accepted your connection request. Say Hi!&quot;<br>        },<br>        &quot;sound&quot; : &quot;default&quot;,<br>        &quot;badge&quot; : 1,<br>   }<br>}</pre><p>b. While your app is running in the simulator, drag and drop the JSON file onto the simulator window.</p><p>c. The notification should appear on the simulated device’s lock screen.</p><p><strong>2. Command Line (simctl Tool):</strong></p><p>a. Open a terminal window and navigate to the directory containing your JSON payload file.</p><p>b. Run the following command, replacing &lt;device_udid&gt; with your simulator&#39;s identifier (obtainable from Xcode&#39;s Devices and Simulators window) and &lt;payload_file&gt; with the actual filename:</p><pre>xcrun simctl push &lt;device_udid&gt; [&lt;bundle_identifier&gt;] &lt;payload_file&gt;</pre><p>c. If your payload JSON includes “Simulator Target Bundle,” omit the &lt;bundle_identifier&gt; argument.</p><p>d. You should see the notification on the simulated device.</p><p><strong>3. Third-Party Tools (RocketSim):</strong></p><ul><li>Tools like RocketSim offer advanced features for managing and sending push notifications. They often provide user-friendly interfaces and pre-built templates for common notification types.</li><li>Follow the specific instructions provided by the chosen tool for configuration and sending notifications.</li></ul><p><strong>Advanced Considerations:</strong></p><ul><li><strong>Payload Customization:</strong> Customize notification content (title, body, sound, etc.) within the JSON payload according to APNs documentation.</li><li><strong>Testing Scenarios:</strong> Simulate various notification scenarios like app in foreground, background, or closed state.</li><li><strong>Error Handling:</strong> Address potential errors related to invalid payloads, disconnected app, or incorrect configurations.</li></ul><p><strong>Conclusion</strong></p><p>By understanding these methods, you can effectively test push notifications within your iOS simulator workflow. Remember to choose the method that best suits your development practices and preferences. Stay updated with the latest APNs guidelines and payload requirements for optimal testing results.</p><p><em>And that’s all for now. If you have any specific topic you would like me to write on, leave your suggestions in the comment section and also if you need any clarifications on this topic, do well to reach out to me on X(Twitter) </em><a href="https://twitter.com/_iamEtornam"><em>@_iamEtornam</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cad77d1a6515" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sharing Secrets Between Widgets: A Deep Dive into Flutter’s SharedAppData]]></title>
            <link>https://etornam-sunu.medium.com/sharing-secrets-between-widgets-a-deep-dive-into-flutters-sharedappdata-a854eae211c2?source=rss-56915b42c43c------2</link>
            <guid isPermaLink="false">https://medium.com/p/a854eae211c2</guid>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[state-management]]></category>
            <category><![CDATA[sharedappdata]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Etornam Sunu Bright]]></dc:creator>
            <pubDate>Mon, 15 Jan 2024 14:06:25 GMT</pubDate>
            <atom:updated>2024-01-18T11:04:12.755Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kxZGD1pLRApBuT4ZbhxdPw.png" /></figure><p>In the bustling world of Flutter development, where widgets form the building blocks of your app, data sharing can sometimes feel like trying to navigate a labyrinth. But fear not, for Flutter offers a hidden gem called SharedAppData that can streamline communication between your widgets. Let&#39;s delve into its secrets and understand how it can simplify your app&#39;s architecture.</p><p><strong>Purpose: A Sharing Hand for Package Developers</strong></p><p>Imagine you’re crafting a beautiful clock widget for other developers to use. This widget needs to know the current time zone, but should it force users to wrap it in a specific application-level provider just for that one piece of data? That’s where SharedAppData shines. It allows your widget to &quot;whisper&quot; the time zone requirement into the app&#39;s ear, without adding unnecessary complexity.</p><p><strong>Advantages: Keeping it Lean and Mean</strong></p><p>SharedAppData boasts several advantages that make it a compelling choice for specific scenarios:</p><ul><li>Lightweight: Unlike state management solutions like Provider, it’s a minimal approach, ideal for sharing a handful of small, immutable data objects.</li><li>Lazy Initialization: Data is retrieved only when needed, optimizing performance.</li><li>Package-Friendly: Developers can seamlessly integrate their widgets into various app structures without introducing intrusive wrapper widgets.</li><li>Built-in: It’s readily available in the Flutter framework, requiring no additional packages.</li></ul><p><strong>Internals: Demystifying the Mechanism</strong></p><p>Under the hood, SharedAppData leverages an InheritedModel widget, creating a data layer accessible to its descendants. Child widgets can &quot;peek&quot; into this layer using SharedAppData.getValue and &quot;store secrets&quot; with SharedAppData.setValue. The framework automatically rebuilds dependent widgets when data changes, ensuring everything stays in sync.</p><p>Enables sharing key/value data with its child and all of the child&#39;s descendants.</p><ul><li>SharedAppData.getValue(context, key, initCallback) creates a dependency on the key and returns the value for the key from the shared data table. If no value exists for the key then the initCallback is used to create the initial value.</li><li>SharedAppData.setValue(context, key, value) changes the value of an entry in the shared data table and forces widgets that depend on that entry to be rebuilt.</li></ul><p><em>Usage: Sharing in Practice</em></p><p>Let’s imagine your scaffold widget using SharedAppData:</p><ul><li>Declare the SharedAppData Widget: Wrap your app’s root widget with SharedAppData</li></ul><pre>    return SharedAppData(<br>        child: Scaffold(<br>      appBar: AppBar(),<br>      floatingActionButton: FloatingActionButton.extended(<br>          onPressed: () {<br>              //TODO: Add action<br>          },<br>          label: const Text(&#39;change foo&#39;)),<br>      body: Text(&#39;Hello&#39;),<br>    ));</pre><ul><li>Set the Secret: Inside your <em>FloatingActionButton.extended</em> widget, use SharedAppData.setValue to set the new value, using the key as foo.</li></ul><pre>    return SharedAppData(<br>        child: Scaffold(<br>      appBar: AppBar(),<br>      floatingActionButton: FloatingActionButton.extended(<br>          onPressed: () {<br>            /// Set the new value of foo<br>            SharedAppData.setValue&lt;String, String?&gt;(context, &#39;foo&#39;, &#39;FOO&#39;);<br>          },<br>          label: const Text(&#39;change foo&#39;)),<br>      body: Text(&#39;Hello&#39;),<br>    ));</pre><ul><li>Access the Secret: Inside your <em>Text</em> widget, use SharedAppData.getValue to retrieve the foo value, leveraging the provided key.</li></ul><pre>return SharedAppData(<br>        child: Scaffold(<br>      appBar: AppBar(),<br>      floatingActionButton: FloatingActionButton.extended(<br>          onPressed: () {<br>            /// Set the new value of foo<br>            SharedAppData.setValue&lt;String, String?&gt;(context, &#39;foo&#39;, &#39;FOO&#39;);<br>          },<br>          label: const Text(&#39;change foo&#39;)),<br>      body: Text(SharedAppData.getValue(context, &#39;foo&#39;, () =&gt; &#39;initial value&#39;)),<br>    ));</pre><ul><li>Keep it Immutable: Remember, only immutable data should be stored in SharedAppData to avoid unnecessary rebuilds.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*7Aa-_N7qy0MQp1lQn7i0Iw.gif" /></figure><p><em>Remember:</em></p><ul><li>SharedAppData is not a general-purpose state management solution. It&#39;s best suited for sharing small, specific pieces of data within a package&#39;s scope.</li><li>Avoid overloading it with too much data, as it can lead to performance issues.</li><li>Consider alternative solutions like Provider, BLoC or Riverpod for complex state management scenarios.</li></ul><p><em>Conclusion:</em></p><p>SharedAppData is a powerful tool for package developers to share essential data with their widgets in a lightweight and efficient manner. By understanding its purpose, advantages, and internals, you can leverage its potential to create seamless and modular Flutter applications. So, the next time you need to share secrets between your widgets, remember this hidden gem in the Flutter arsenal!</p><p><strong>I hope this article provides a comprehensive overview of </strong><strong>SharedAppData. Feel free to ask any further questions you might have!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a854eae211c2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building responsive Flutter desktop and web apps]]></title>
            <link>https://etornam-sunu.medium.com/building-responsive-flutter-desktop-and-web-apps-11145ff0cf1e?source=rss-56915b42c43c------2</link>
            <guid isPermaLink="false">https://medium.com/p/11145ff0cf1e</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[responsive-design]]></category>
            <category><![CDATA[web]]></category>
            <category><![CDATA[desktop]]></category>
            <dc:creator><![CDATA[Etornam Sunu Bright]]></dc:creator>
            <pubDate>Thu, 06 Oct 2022 00:12:53 GMT</pubDate>
            <atom:updated>2022-10-06T00:12:53.310Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KSomxF-ytoL5-2W4uf8Kxg.png" /></figure><p>Flutter has grown over the years. compared with version 1.0 you can realise the tremendous new feature added to this awesome framework. This article is going to explain how to build responsive desktop applications in Flutter.</p><p>Since the introduction of Flutter desktop, there have been a number of desktop apps built with Flutter and some I have personally built myself. Responsiveness is one thing to have to worry about when developing any application that will run on different screens. We will look at two approaches to fix this issue in Flutter.</p><ol><li><strong><em>MediaQuery (MediaQuery.of(context).size)</em></strong></li></ol><p>For a better user experience, it is normal practice to have distinct UI layouts for different screen sizes when building an app for both phones, tablets and desktops. If the user has preferences for font sizes or wants to reduce animations. This is where MediaQuery comes into play; you can use it to obtain information about the current device size and user preferences, and then adapt your layout appropriately. MediaQuery gives a higher-level view of the current app’s screen size, as well as more specific information about the device and its layout preferences. In practice, MediaQuery is always present. It is easily obtained by invoking <strong><em>MediaQuery.of</em></strong> in the build method. Although MediaQuery does not handle responsiveness itself, it gives you the needed properties to determine the width and height of the device screen.</p><p>You can then seek up all kinds of useful information about the device you’re using, such as the screen size, and construct your layout appropriately. MediaQuery may also be used to determine the orientation of the current device or whether the user has changed the default font size. It may also be used, similarly to a safe area widget, to assess if areas of the screen are blocked by a system UI. Let’s take a look at an example of how to use <a href="https://api.flutter.dev/flutter/widgets/MediaQuery-class.html"><strong>MediaQuery</strong></a>.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/da01331becc9f699f01e61e6ef9c45ea/href">https://medium.com/media/da01331becc9f699f01e61e6ef9c45ea/href</a></iframe><p>Let’s look at the output of this code. You will realise that as the window gets smaller, the red section disappears.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*VQSO1TPZI704GVQglYXxxw.gif" /><figcaption>code output</figcaption></figure><p>Now let’s do that same with a <strong>LayoutBuilder…</strong></p><p><strong><em>2. LayoutBuilder</em></strong></p><p>The LayoutBuilder widget builds a widget tree that can depend on the parent widget’s size (a minimum and maximum width, and a minimum and maximum height).</p><p>Similar to the <a href="https://api.flutter.dev/flutter/widgets/Builder-class.html">Builder</a> widget except that the framework calls the <a href="https://api.flutter.dev/flutter/widgets/LayoutBuilder/builder.html">builder</a> function at layout time and provides the parent widget’s constraints. This is useful when the parent constrains the child’s size and doesn’t depend on the child’s intrinsic size. The <a href="https://api.flutter.dev/flutter/widgets/LayoutBuilder-class.html">LayoutBuilder</a>’s final size will match its child’s size.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c113201c07de478823dce4553361145a/href">https://medium.com/media/c113201c07de478823dce4553361145a/href</a></iframe><p>Let’s look at the output of this code. You will realise that as the window gets smaller, the red section disappears and an additional advantage is you have more control over how you layout the widgets. This approach is cleaner in my opinion.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*6kFF2FbexjJ-xm1YLqSuow.gif" /><figcaption>code output</figcaption></figure><p>And that’s all for now. If you have any specific topic you would like me to write on, leave your suggestions in the comment section and also if you need any clarifications on this topic, do well to reach out to me on Twitter <a href="https://twitter.com/_iamEtornam">@_iamEtornam</a>.</p><p>Full source code:</p><p><a href="https://github.com/iamEtornam/responsive-layouting">GitHub - iamEtornam/responsive-layouting</a></p><p><strong><em>resources:</em></strong></p><ol><li>read more about<em> </em><a href="https://api.flutter.dev/flutter/widgets/MediaQuery-class.html"><em>MediaQuery class</em></a></li><li>read more about<em> </em><a href="https://api.flutter.dev/flutter/widgets/LayoutBuilder-class.html"><em>Layoutbuilder class</em></a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=11145ff0cf1e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploy your Nodejs + Auth0 REST API to Cyclic.sh under 4 minutes]]></title>
            <link>https://etornam-sunu.medium.com/deploy-your-nodejs-auth0-rest-api-under-4minutes-using-cyclic-sh-6b3730bfdb83?source=rss-56915b42c43c------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b3730bfdb83</guid>
            <category><![CDATA[cyclic]]></category>
            <category><![CDATA[rest]]></category>
            <category><![CDATA[auth0]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <dc:creator><![CDATA[Etornam Sunu Bright]]></dc:creator>
            <pubDate>Thu, 16 Dec 2021 06:16:18 GMT</pubDate>
            <atom:updated>2021-12-20T11:45:49.890Z</atom:updated>
            <content:encoded><![CDATA[<p>Deploying APIs can sometimes be a pain in the butt when your service provider overcomplicates the deployment and setup process. This short article will demo how to deploy your Restful Nodejs application to Cyclic.sh in less than 4 minutes.</p><p>Yes!, you heard right, less than 4 minutes🔥😱😱.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BQ6cnukE65SYtNcbDtsnlw.png" /><figcaption>from cyclic.sh homepage</figcaption></figure><p>Cyclic is a provider that helps you Launch your API in seconds. Push your code to Github and let the CI/CD (continuous integration/continuous delivery) integration trigger and deploy your service onto a global infrastructure in seconds. No cryptic CloudFormation errors. No mysterious API Gateway errors. No YAML parse errors. No hunting for CloudWatch log groups. No wasted time.</p><p><strong>Important!</strong></p><p>I already have my Nodejs Auth0 backend done. To follow along with this project, clone the repo from <a href="https://github.com/RegNex/nodejs-auth0">here</a>.</p><p><strong>Deployment Demo</strong></p><p>To deploy your codebase, follow the following steps:</p><p>The first thing you must do is create a repository on <a href="https://github.com/">github.com</a> for your project and push your code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0i0cCr4dKnk9ECBGaG8iHg.png" /><figcaption>Github repo create page</figcaption></figure><p>Next, signup to <a href="https://cyclic.sh/">Cyclic.sh</a>. The signup process is seamless, and all you need is to signup using your Github account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F95eOZv0jSKAebMNQZ_nqQ.png" /><figcaption>cyclic.sh signup page</figcaption></figure><p>After successful signup, you will see a dashboard; where all the magic happens. You can locate the docs at the top right corner, just right before the profile.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F9gQHZf1AwE2ygFdJCsifA.png" /><figcaption>locate docs at the top right corner</figcaption></figure><p>Now you need to deploy your code. Click the “deploy” button (green button) and select the “Link you own” tab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RRr0v6Ye_x3mabhT_P88hw.png" /><figcaption>deploy button</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*APXGMrDVE7_jhmuVe-1bdg.png" /><figcaption>link your code from Github</figcaption></figure><p>Search for the repo you want to deploy, in your case “nodejs-auth0,” and select it and connect it to your Github account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ktGvxPdj14nx7lP3wv67TQ.png" /></figure><p>At the prompt, you need to confirm your Github access, and after confirming, all you have to do is to approve and install, and that’s it 🎉</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ImYxsErzkRlCrpmrCj7mgg.png" /></figure><p>Once you approve and install, the deployment process will start. 2–3mins should do it 🎊🎉🎊🎉🎊🎉</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HgZzQbwMxN09qVDf-fPE-w.png" /></figure><p>The final step is to set your environment variables on the dashboard. The dashboard for your project looks like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*54WbdFqcH6jUI2ZqnrT34w.png" /></figure><p>This is a “.env” file; you can also include those configurations on the dashboard by clicking on “Variables.” After this configuration, everything should be up and running 🔥</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j9M7vgCE8KY94-IMArjpaA.png" /></figure><p><strong>Deploying new changes</strong></p><p>After all the setups and configurations, to deploy new changes, push your code to Github, and Github actions will do the rest 😀😉</p><p><strong>Conclusion</strong></p><p>Deploying a RESTful API shouldn’t be hectic and <a href="https://app.cyclic.sh/">cyclic.sh</a> has made sure deploying your backend code to the cloud is a simple as possible.</p><p>If you find any difficulty in the deployment process, you can reach out to the <a href="https://app.cyclic.sh/">cyclic.sh</a> team on <a href="https://discord.com/invite/huhcqxXCbE">discord</a>.</p><p>Do well to follow me on <a href="https://twitter.com/_iamEtornam">Twitter</a> and <a href="https://www.linkedin.com/in/etornam-sunu/">LinkedIn</a> to connect.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b3730bfdb83" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to limit window resize in Flutter Desktop]]></title>
            <link>https://etornam-sunu.medium.com/how-to-limit-window-resize-in-flutter-desktop-47d6a495822e?source=rss-56915b42c43c------2</link>
            <guid isPermaLink="false">https://medium.com/p/47d6a495822e</guid>
            <category><![CDATA[desktop-app]]></category>
            <category><![CDATA[flutter-widget]]></category>
            <category><![CDATA[flutter-desktop]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Etornam Sunu Bright]]></dc:creator>
            <pubDate>Mon, 26 Oct 2020 08:52:59 GMT</pubDate>
            <atom:updated>2020-10-26T08:52:59.106Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Hi there!</em></p><p><em>It has been such a looooong time since I wrote an article or even created a youtube ☹️ tutorial but hey, there’s good news 🎤, </em><strong><em>I’M BACK 🔥🔥🔥.</em></strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F4ayE7jjRuUBQk%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F4ayE7jjRuUBQk%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2F4ayE7jjRuUBQk%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="322" frameborder="0" scrolling="no"><a href="https://medium.com/media/69d4c13eef633422c78ca3886ba86dea/href">https://medium.com/media/69d4c13eef633422c78ca3886ba86dea/href</a></iframe><p>In the past few weeks, I have been working on a Desktop app using Flutter <em>(you know one of those side projects you start then drop it then pick it up again…? yeaaaah!) </em>and I had problems with the window screen resizing.</p><p>At some point, you can resize it such that nothing else displays which is an undesirable feature. Hence I started doing some research on how to limit the resize of the window.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*cXiGEvhygfrZ2oO17IXf1g.gif" /></figure><p>After talking to a number of developers and also reading some articles, this effect can <em>“only”</em> be done natively. This requires editing some files for the MacOS, Windows and Linux file folder. This will be a bit stressful especially if the developer is not accustomed to these platforms, I did a deeper research by looking at the source code of existing Flutter desktop applications (<a href="https://github.com/leoafarias/fvm"><em>FVM GUI</em></a>) and discovered a google package that does it all for you 🔥🔥🔥 (<a href="https://github.com/google/flutter-desktop-embedding"><em>flutter desktop embedding</em></a>). <em>Here is a simple example on how to use limit the window size of a desktop app:</em></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d83b2aab4b365e2c45a54513789dcf77/href">https://medium.com/media/d83b2aab4b365e2c45a54513789dcf77/href</a></iframe><p>After applying the above code example, it was all fixed!!! Whew!!!!..</p><p>And now, I have a functional and beautiful page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*0-b6FNCMk1nJVHx3Ju9PMA.gif" /></figure><p>And that’s all for now. I will share the progress of the desktop application I’m developing in due time ⏰. And if you need any clarifications on this topic, do well to reach out to me on twitter <a href="https://twitter.com/_iamEtornam">@_iamEtornam</a>.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2Fl1J3CbFgn5o7DGRuE%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fl1J3CbFgn5o7DGRuE%2Fgiphy.gif&amp;image=https%3A%2F%2Fmedia3.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExbG51YTI0ZmU3ZTI1OGx2ZGVjY3h4NmJhYTJjeHFuOGZsOGQ1bTd4eiZlcD12MV9naWZzX2dpZklkJmN0PWc%2Fl1J3CbFgn5o7DGRuE%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="281" frameborder="0" scrolling="no"><a href="https://medium.com/media/5fa8f4266a7202d18b96ad7d41b42eef/href">https://medium.com/media/5fa8f4266a7202d18b96ad7d41b42eef/href</a></iframe><p><em>Akpẽ Kaka (Thank you in E</em>ʋE)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=47d6a495822e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>