<?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 Mubarak Sa&#39;eed Ibrahim ( codeswot ) on Medium]]></title>
        <description><![CDATA[Stories by Mubarak Sa&#39;eed Ibrahim ( codeswot ) on Medium]]></description>
        <link>https://medium.com/@codeswot?source=rss-ec9e2b42bff9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*e2d13z6eoztWW6LIHDoOhQ.jpeg</url>
            <title>Stories by Mubarak Sa&amp;#39;eed Ibrahim ( codeswot ) on Medium</title>
            <link>https://medium.com/@codeswot?source=rss-ec9e2b42bff9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 15 May 2026 15:40:14 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@codeswot/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[How To Go Beyond Light Speed With Dart Extensions ]]></title>
            <link>https://codeswot.medium.com/how-to-go-beyond-light-speed-with-dart-extensions-1bcf6dd06ae5?source=rss-ec9e2b42bff9------2</link>
            <guid isPermaLink="false">https://medium.com/p/1bcf6dd06ae5</guid>
            <category><![CDATA[extension]]></category>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[dartlang]]></category>
            <dc:creator><![CDATA[Mubarak Sa'eed Ibrahim ( codeswot )]]></dc:creator>
            <pubDate>Mon, 10 Apr 2023 10:04:45 GMT</pubDate>
            <atom:updated>2023-04-10T10:11:42.102Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bdxVbC4cipyipqrMswTvNQ.png" /><figcaption>codeswot dart extensions</figcaption></figure><p>What’s up beautiful people of the internet! I am Mubarak, Welcome to codeswot’s utility belt</p><p>Today we talk about Dart extension. If you love programming like me then you know how important it is to have a good set of tools in your utility belt to make you a better Batman (I mean programmer). 😁</p><p>Dart extension is one of many amazing tools that can make your life easier while building Flutter apps or even core Dart apps.</p><p>Simply put: Dart extensions are a way to add new functionality to existing classes and objects. They’re a powerful tool that can be used to make your code more concise and efficient.</p><p>Imagine you have a really cool rocket .🚀 You can do tons of fun stuff with it, like fly it to Mars, land it on the moon, or even take it apart and add more features. But the problem is, taking it apart to add new features may take up much of your time and you may end up breaking the rocket. But you really need to add a new feature to your rocket like making it go faster than the speed of light ⚡️ in other to do this you may need to adjust the engine to be able to accommodate such a feature, remember you may damage the rocket if you try to take it apart yourself. The good news is that we have these cubes called “extension cubes”, Think of them as tiny feature building blocks that let you build your new feature and attach it to the existing rocket without disassembling it. This saves you a lot of time reading manuals about how the rocket may operate and other things. All that’s left to do is to add your cube’s faster-than-light capability as an extension to your rocket. To create a Dart extension, you simply need to define a new class that will be an extension to the class or object you want to add functionality to, in our case Rocket {}. You can then add any methods, properties, or operators to this new class and we want to add fasterThanLight();</p><p>Now Imagine downloading a package from <a href="http://pub.dev/"><strong>pub.dev</strong></a> (Rocket) and the package has a class Rocket {} as our existing class.</p><p>So our code looks like this :</p><pre>class Rocket {<br>double rocketVersionget =&gt; 3.0;<br>moveFoward() {<br>//moves the rocket foward<br>}<br>landRocket() {<br>//lands the rocket<br>}<br>//other complicated stuff<br>}</pre><p>And here is how we use our extension to add our cool feature</p><pre>extension RocketExtension on Rocket {<br> lightSpeed () {<br>    return fasterThanLight();<br>  }<br>}</pre><p>now we can easily access our lightSpeed(); method by first instantiating our rocket class final awesomeRocket = Rocket(); and call the method from the instance variable awesomeRocket.lightSpeed(); see how cool that is? Dart extensions are a great way to add new functionality to your code without having to modify the existing classes and objects. They’re a powerful tool that can make your code more concise, efficient, and maintainable.<br>subscribe and follow me for more of codeswot’s utility belt. See you next time, beautiful people!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1bcf6dd06ae5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>