<?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 Md Sadab Wasim on Medium]]></title>
        <description><![CDATA[Stories by Md Sadab Wasim on Medium]]></description>
        <link>https://medium.com/@sadabwasim?source=rss-51fd6254162------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*YOJf7n9kN_s6FvhpDmLhAQ.png</url>
            <title>Stories by Md Sadab Wasim on Medium</title>
            <link>https://medium.com/@sadabwasim?source=rss-51fd6254162------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 05:46:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sadabwasim/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[Unlock Visuals in Neovim: Viewing Images Made Easy]]></title>
            <link>https://medium.com/indian-coder/unlock-visuals-in-neovim-viewing-images-made-easy-7753848e26e8?source=rss-51fd6254162------2</link>
            <guid isPermaLink="false">https://medium.com/p/7753848e26e8</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[image]]></category>
            <category><![CDATA[lunarvim]]></category>
            <category><![CDATA[neovim]]></category>
            <category><![CDATA[react-native]]></category>
            <dc:creator><![CDATA[Md Sadab Wasim]]></dc:creator>
            <pubDate>Sat, 08 Jun 2024 13:15:12 GMT</pubDate>
            <atom:updated>2024-06-08T13:15:12.417Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yDGaPDCOUwIg3wDHCaljAA.png" /><figcaption>Rendering image in kitty</figcaption></figure><p>I’m a mobile engineer, and every day I work with image assets. It’s such a hassle to constantly open files just to check images before using them. The lack of image rendering inside Neovim was really bugging me. But finally, we have our savior: Image.nvim!</p><p><a href="https://github.com/3rd/image.nvim"><strong>image.nvim</strong></a><strong> </strong>is a plugin that allows you to display images in <strong>Neovim</strong>. It supports a variety of image formats, including <strong>PNG</strong>, <strong>GIF</strong> and even <strong>SVG</strong>.</p><p>You will need to use the <a href="https://sw.kovidgoyal.net/kitty/"><strong>kitty terminal</strong></a> emulator to display the images or install <a href="https://github.com/jstkdng/ueberzugpp"><strong>ueberzug++</strong></a> if you’d like to use a different terminal.</p><p>Before adding any configurations, we’ll need to install a few dependencies:</p><p>First up, you’ll need to <a href="https://github.com/3rd/image.nvim#installing-imagemagick"><strong>install ImageMagick</strong></a>, a powerful software suite for editing and manipulating digital images.</p><p><strong>Ubuntu/Debian</strong></p><pre>sudo apt install imagemagick-dev</pre><p><strong>MacOS</strong></p><pre>brew install imagemagick</pre><p><strong>NOTE</strong>: If you are using MacOS you may need to add the following to your <strong>`~/.zshrc`</strong> or <strong>`~/.bashrc`</strong> file(only add it if default config doesn’t work for you):</p><pre>export DYLD_LIBRARY_PATH=&quot;$(brew - prefix)/lib:$DYLD_LIBRARY_PATH&quot;</pre><p>If you’re using any terminal other than kitty you need to use use the <strong>ueberzug++</strong> you can install it with the following command:</p><p><strong>MacOS</strong></p><pre>brew install jstkdng/programs/ueberzugpp</pre><p>If you’re on Linux you can install <strong>ueberzug++</strong> <a href="https://software.opensuse.org/download.html?project=home%3Ajustkidding&amp;package=ueberzugpp">from here</a>.</p><h3>Install the magick rock</h3><p>Before we can start using <strong>image.nvim</strong> we need to install the <strong>magick</strong> <strong>rock</strong>.</p><p>Here is a lazy specification for the plugin:</p><pre>{<br> &quot;vhyrro/luarocks.nvim&quot;,<br> priority = 1001, -- this plugin needs to run before anything else<br> opts = {<br> rocks = { &quot;magick&quot; },<br> },<br>}</pre><h3>Configure image.nvim</h3><p>Now that we have the <strong>magick rock</strong> installed we can install the image.nvim plugin.</p><pre>{<br> &quot;3rd/image.nvim&quot;,<br> dependencies = { &quot;luarocks.nvim&quot; },<br> config = function()<br> require(&quot;image&quot;).setup({<br> backend = &quot;kitty&quot;, - or &quot;ueberzug&quot;<br> max_height_window_percentage = 50,<br> hijack_file_patterns = { &quot;*.png&quot;, &quot;*.jpg&quot;, &quot;*.jpeg&quot;, &quot;*.gif&quot;, &quot;*.webp&quot;, &quot;*.svg&quot; },<br> })<br> end<br>}</pre><p>If you find any issues while doing the configuration please comment here or look it up on the <a href="https://github.com/3rd/image.nvim?tab=readme-ov-file#configuration">readme</a>.</p><h4>That’s it, now you should be able to see the images from your terminal.</h4><p>If you want to setup Neovim for flutter with debugger, check out my article about it here:</p><p><a href="https://medium.com/indian-coder/supercharge-flutter-with-neovim-a-complete-setup-guide-cbe5cbf5b073">Supercharge Flutter with Neovim: A Complete Setup Guide</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_RtYYkBQASqpdKjI" /><figcaption>Photo by <a href="https://unsplash.com/@goian?utm_source=medium&amp;utm_medium=referral">Ian Schneider</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7753848e26e8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/indian-coder/unlock-visuals-in-neovim-viewing-images-made-easy-7753848e26e8">Unlock Visuals in Neovim: Viewing Images Made Easy</a> was originally published in <a href="https://medium.com/indian-coder">Aesthetic coders</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Level Up Your Dev Game]]></title>
            <link>https://sadabwasim.medium.com/level-up-your-dev-game-60aa3996a617?source=rss-51fd6254162------2</link>
            <guid isPermaLink="false">https://medium.com/p/60aa3996a617</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[apps]]></category>
            <category><![CDATA[setup]]></category>
            <category><![CDATA[mac]]></category>
            <dc:creator><![CDATA[Md Sadab Wasim]]></dc:creator>
            <pubDate>Sun, 18 Feb 2024 05:02:56 GMT</pubDate>
            <atom:updated>2024-02-18T05:02:56.205Z</atom:updated>
            <content:encoded><![CDATA[<h4>Mac apps you don’t know you needed</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kKPv9LP8vgB1HoXz" /><figcaption>Photo by <a href="https://unsplash.com/@sounce_cosplay?utm_source=medium&amp;utm_medium=referral">Emmanuel Denier</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Think you’ve mastered your Mac development setup? Think again!</p><p>This article dives into hidden Mac apps you never knew existed but desperately need. Prepare to level up your dev game and unlock a world of productivity.</p><p><a href="https://pilotmoon.com/scrollreverser/"><strong>Scroll reverser</strong></a><strong>:</strong> One annoying thing I found about Mac is, it reversed the scroll direction of the external mouse, it messes with my mind as I have to enable and disable natural scrolling on settings all the time.</p><p>The simple solution is to use <a href="https://pilotmoon.com/scrollreverser/"><strong>the scroll reverser app</strong></a> which detects if you’ve connected an external mouse and fixes your scroll behavior.</p><p><a href="https://apps.apple.com/in/app/hotkey-app/id975890633?mt=12"><strong>Hotkey</strong></a><strong>: Dream of mastering your workflow like </strong><a href="https://www.youtube.com/c/theprimeagen"><strong>ThePrimeEagen</strong></a><strong>, but intimidated by complex setups or Linux installations?</strong></p><p>Hotkey app is a handy Mac tool lets you assign custom keyboard shortcuts to launch any application, instantly streamlining your development workflow.</p><p>Imagine blazing through your tasks with a simple <strong>Cmd + 1, 2, 3…</strong> sequence, just like I do! Hotkey eliminates the need for clunky mouse clicks and navigation, boosting your productivity and efficiency to new heights.</p><p><a href="https://hovancik.net/stretchly/"><strong>Stretchly</strong></a><strong>:</strong> <strong>Feeling chained to your chair?</strong> Escape the desk with Stretchly.</p><p>This <strong>simple, open-source app</strong> empowers you to <strong>customize break intervals and durations</strong>, ensuring they fit seamlessly into your workflow. Plus, get <strong>guided micro-exercises</strong> to stretch, move, and <strong>combat those posture issues</strong>.</p><h4><strong>What are your favorite hidden Mac gems for developers? Share your recommendations in the comments and let’s build a community of empowered coders!</strong></h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=60aa3996a617" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Supercharge Flutter with Neovim: A Complete Setup Guide]]></title>
            <link>https://medium.com/indian-coder/supercharge-flutter-with-neovim-a-complete-setup-guide-cbe5cbf5b073?source=rss-51fd6254162------2</link>
            <guid isPermaLink="false">https://medium.com/p/cbe5cbf5b073</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[vim]]></category>
            <category><![CDATA[dx]]></category>
            <category><![CDATA[neovim]]></category>
            <dc:creator><![CDATA[Md Sadab Wasim]]></dc:creator>
            <pubDate>Sun, 17 Sep 2023 12:17:50 GMT</pubDate>
            <atom:updated>2024-12-23T12:48:45.115Z</atom:updated>
            <content:encoded><![CDATA[<p>Effortless Flutter Development with Neovim and LunarVim: Master Streamlined Configurations, and DAP Debugging.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CIC_U3iOdTLCOUqXAu411w.png" /></figure><p>Hey there, Get ready to level up your coding game with the unbeatable combo of Flutter and Neovim. 🚀 We all love Speed and Flutter, it’s one common thing that brings us all together, And that’s why you’ll love Neovim.</p><p>I’m super excited to share this article because it all started with my own month-long search for the perfect Neovim setup for Flutter. Unfortunately, I couldn’t find what I needed, but after figuring it all out, I knew I had to create this guide to help my awesome fellow Flutter developers!</p><h4>How I started my Neovim configuration?</h4><p>Unlike many, I prefer not to start my Neovim configuration from scratch. Don’t get me wrong, I enjoy tweaking and playing with my IDE configs, but I’d rather not waste time on the most basic things.</p><p>Wondering what prebuilt Neovim configurations are out there? You’ve got two popular options to choose from: NvChad and LunarVim. At first, I dived into NvChad, but the configuration style was akin to starting from scratch (which has its long-term benefits). However, that wasn’t quite what I was after. My goal was to have a setup where I could easily tweak my configuration and see the changes in action without having to make adjustments across multiple files.</p><p>So I chose <a href="https://www.lunarvim.org/">Lunarvim</a>, and it provided me with exactly what I needed. It offers options to quickly tweak my configuration, and if I ever feel like it, I can switch back to a more traditional Neovim setup. It’s the best of both worlds!</p><h4>What do I have now?</h4><p>With Lunarvim, I have everything I need in my IDE fully set up, and there’s even more to love! One feature I adore is the integrated whichkey, which conveniently displays the keymaps bound to the key I just pressed. It’s like having a helpful guide right at my fingertips!</p><h4>Initial Flutter setup</h4><p>I found<a href="https://github.com/akinsho/flutter-tools.nvim"> the flutter-tools</a> plugin which has all I need to run the Flutter app. I started with basic configuration.</p><pre>{<br>    &#39;akinsho/flutter-tools.nvim&#39;,<br>    dependencies = {<br>        &#39;nvim-lua/plenary.nvim&#39;,<br>        &#39;stevearc/dressing.nvim&#39;,<br>    },<br>    config = true,<br>}</pre><p>That’s all you need to start running your Flutter apps, While that may be sufficient for some, it’s not quite enough for me. I require a debugger to be seamlessly integrated into my setup, enabling me to effortlessly debug my Flutter apps with ease. Let’s take our Flutter development to the next level!</p><h4><strong>DAP integration</strong></h4><p>For Dart, we’re going to use dart-debug-adapter (install it using <a href="https://github.com/williamboman/mason.nvim">mason</a>), and f<a href="https://github.com/mfussenegger/nvim-dap/wiki/Debug-Adapter-installation#dart">ollow these instructions</a> to quickly set this up.</p><h4>Final Flutter setup with debug support</h4><pre>lvim.plugins = {<br>  -- for DAP support<br>  { &quot;mfussenegger/nvim-dap&quot; },<br>  {<br>    &quot;akinsho/flutter-tools.nvim&quot;,<br>    dependencies = { &quot;nvim-lua/plenary.nvim&quot;, &quot;stevearc/dressing.nvim&quot; },<br>    config = function()<br>      require(&#39;flutter-tools&#39;).setup {<br>       -- (uncomment below line for windows only)<br>       -- flutter_path = &quot;home/flutter/bin/flutter.bat&quot;,<br><br>        debugger = {<br>          -- make these two params true to enable debug mode<br>          enabled = false,<br>          run_via_dap = false,<br>          register_configurations = function(_)<br><br>             require(&quot;dap&quot;).adapters.dart = {<br>                type = &quot;executable&quot;,<br>                command = vim.fn.stdpath(&quot;data&quot;) .. &quot;/mason/bin/dart-debug-adapter&quot;,<br>                args = {&quot;flutter&quot;}<br>              }<br><br>            require(&quot;dap&quot;).configurations.dart = {<br>              {<br>                type = &quot;dart&quot;,<br>                request = &quot;launch&quot;,<br>                name = &quot;Launch flutter&quot;,<br>                dartSdkPath = &#39;home/flutter/bin/cache/dart-sdk/&#39;,<br>                flutterSdkPath = &quot;home/flutter&quot;,<br>                program = &quot;${workspaceFolder}/lib/main.dart&quot;,<br>                cwd = &quot;${workspaceFolder}&quot;,<br>              }<br>            }<br>            -- uncomment below line if you&#39;ve launch.json file already in your vscode setup<br>            -- require(&quot;dap.ext.vscode&quot;).load_launchjs()<br>          end,<br>        },<br>        dev_log = {<br>          -- toggle it when you run without DAP<br>          enabled = false,<br>          open_cmd = &quot;tabedit&quot;,<br>        },<br>        lsp = {<br>          on_attach = require(&quot;lvim.lsp&quot;).common_on_attach,<br>          capabilities = require(&quot;lvim.lsp&quot;).default_capabilities,<br>        },<br><br>      }<br>    end<br>  },<br>  -- for dart syntax hightling<br>  {<br>    &quot;dart-lang/dart-vim-plugin&quot;<br>  },<br>}</pre><p>In this article, I’ve focused solely on Flutter and Dart-related plugins for Neovim. However, stay tuned for future articles where I’ll be sharing my other configurations and setups.</p><p>And there you have it, my fellow Flutter developers! I hope this article has been a game-changer for your Neovim and Flutter journey. Remember, we’re all in this together, so let’s keep sharing our knowledge and making our coding experiences even more enjoyable.</p><blockquote><strong>Update</strong>: Since Lunarvim is no longer actively maintained, I switched to <a href="https://www.lazyvim.org/"><strong>Lazyvim</strong></a> with the same setup, you can check <a href="https://github.com/MDSADABWASIM/.dotfiles/tree/master/nvim"><strong>my dotfiles</strong></a> for reference.</blockquote><p>Read my other popular articles:</p><ul><li><a href="https://medium.com/codechai/5-concepts-every-flutter-dev-should-know-48673ab074cb">5 concepts every Flutter dev should know</a></li><li><a href="https://medium.com/indian-coder/flutter-architecture-that-i-adore-8139080abb">Flutter state management architecture that I adore</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*g_T86NnIBi5r7Tt0" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cbe5cbf5b073" width="1" height="1" alt=""><hr><p><a href="https://medium.com/indian-coder/supercharge-flutter-with-neovim-a-complete-setup-guide-cbe5cbf5b073">Supercharge Flutter with Neovim: A Complete Setup Guide</a> was originally published in <a href="https://medium.com/indian-coder">Aesthetic coders</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CRUD with Supabase in Flutter]]></title>
            <link>https://sadabwasim.medium.com/crud-with-supabase-in-flutter-dbe97fa0c15?source=rss-51fd6254162------2</link>
            <guid isPermaLink="false">https://medium.com/p/dbe97fa0c15</guid>
            <category><![CDATA[crud]]></category>
            <category><![CDATA[supabase]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[dart]]></category>
            <dc:creator><![CDATA[Md Sadab Wasim]]></dc:creator>
            <pubDate>Thu, 20 Oct 2022 04:12:52 GMT</pubDate>
            <atom:updated>2022-10-20T04:12:52.838Z</atom:updated>
            <content:encoded><![CDATA[<p>A simple way to do crud operations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GQLOKZratS1R4BF_RTTlmg.png" /></figure><p>Supabase is one powerful tool that is face-to-face against the giant Firebase, for several reasons that I defined <a href="https://medium.com/indian-coder/why-did-i-choose-supabase-over-firebase-467a7cf9c18">here</a>, I chose Supabase for storing my database.</p><p>Once you’ve chosen the database for your project, now the next step is to learn how to use it efficiently and effectively.</p><p>Before we start with the CRUD operation, we will create a service class where we will write all the CRUD-related methods.</p><pre>class SupabaseService {  </pre><pre>static SupabaseClient? _instance;  </pre><pre>SupabaseService() {<br>    getInstance();  <br>}   </pre><pre>static SupabaseClient? getInstance() {</pre><pre>//Add your API url and key here.<br>_instance ?? = SupabaseClient(&quot;API_URL&quot;,&quot;PUBLIC_KEY&quot;);     </pre><pre>return _instance;  </pre><pre>}</pre><h4>CREATE: How to insert your data to the supabase tables.</h4><p>Suppose we have a “<strong>users</strong>” table in supabase, now we want to insert a user model into that, let’s see how to do it.</p><pre>Future&lt;bool?&gt; createUser(String name, String email) async {    </pre><pre>try { </pre><pre>final response = await _instance!.from(&#39;users&#39;)<br>.insert({</pre><pre>&#39;name&#39;: name,&#39;email&#39;: email</pre><pre>}).execute();      </pre><pre>if (response.error == null) {</pre><pre>return true;     </pre><pre>} else {</pre><pre>return false;   </pre><pre>}    <br>} catch (e) {  </pre><pre>throw Exception(&quot;Failed to insert new userdata in db&quot;),  </pre><pre>}  <br>}</pre><h4>Read: How to get your data from the supabase tables.</h4><p>Now we want to get data of a specific user by their email id.</p><pre>Future getUserDetailsByEmail(String email) async {    </pre><pre>try {   </pre><pre>final response = await _instance!.from(&#39;users&#39;)<br>.select()          <br>.eq(&#39;email&#39;, email)          <br>.execute(count: CountOption.exact);      </pre><pre>return response.data;    </pre><pre>} catch (e) {   </pre><pre>throw Exception(&quot;Failed to get user details by email from db&quot;);</pre><pre>}<br>}</pre><h4>Update: Update existing data in supabase</h4><p>Updating specific user details identified by the user’s email.</p><pre>Future&lt;bool?&gt; updateUserDetails(String name, String email) async {</pre><pre>try {</pre><pre>final response = await _instance!<br>.from(&#39;users&#39;)<br>.update({<br>&#39;name&#39;: name,<br>&#39;email&#39;: email,<br>}, </pre><pre>returning: ReturningOption.minimal)<br>.eq(&#39;email&#39;, email)<br>.execute(count: CountOption.exact);</pre><pre>return response.error == null ? true : false;</pre><pre>} catch (e) {</pre><pre>throw  Exception(&quot;Failed to update userdata in db&quot;);</pre><pre>}<br>}</pre><h4>Delete: delete existing data from supabase</h4><p>Delete the existing user’s data, identified by the user’s email.</p><pre>Future&lt;bool?&gt; deleteUserDetails(String email) async {</pre><pre>try {</pre><pre>final response = await _instance!<br>.from(&#39;users&#39;)<br>.delete(returning: ReturningOption.minimal)<br>.eq(&#39;email&#39;, email)<br>.execute(count: CountOption.exact);      </pre><pre>return response.error == null ? true : false;    </pre><pre>} catch (e) {<br>throw Exception(&quot;Failed to delete userdata from db&quot;);<br>}<br>}</pre><p>That’s it. Hopefully, you now got the idea of how to do crud operations in supabase.</p><p>Thanks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dbe97fa0c15" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[5 oldest tips to write clean code.]]></title>
            <link>https://medium.com/indian-coder/5-oldest-tips-to-write-clean-code-1c6b41fc7ef4?source=rss-51fd6254162------2</link>
            <guid isPermaLink="false">https://medium.com/p/1c6b41fc7ef4</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[clean-code]]></category>
            <dc:creator><![CDATA[Md Sadab Wasim]]></dc:creator>
            <pubDate>Wed, 12 Oct 2022 09:57:49 GMT</pubDate>
            <atom:updated>2022-10-12T09:57:49.643Z</atom:updated>
            <content:encoded><![CDATA[<p>These will make your codebase solid.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-3e7eI31cUIhsJqG" /><figcaption>Photo by <a href="https://unsplash.com/@towfiqu999999?utm_source=medium&amp;utm_medium=referral">Towfiqu barbhuiya</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Want to write clean code, but don’t know where to start?<br>I am here to give you a path that you can easily follow.</p><p>We all know how to write code and build a project, but it’s not enough if you want to maintain the project for a long time.</p><p>And that’s where the concept of clean code comes into the picture.</p><h3>Sadab | Clean Code And Life on Twitter: &quot;I once heard Uncle bob saying: &quot;Clean code is written by someone who cares.&quot; / Twitter&quot;</h3><p>I once heard Uncle bob saying: &quot;Clean code is written by someone who cares.&quot;</p><p>Today we will focus on <strong>SOLID</strong> principles:</p><h4>S: Single responsibility principle</h4><p>This concept is fairly simple, it says your class and function should have only one responsibility.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/0*ln0dqWrGPPf0UkDK" /></figure><h4>O: Open closed principle</h4><p>Your class should be open for extension but closed for modification. <br>For example, if you want to add some parameters or methods to an existing class then don’t directly modify the class, create another class that extends the existing class properties, and here add the new things you need.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/524/0*O8mqKHyX6gWlSBIr" /></figure><h4>L: Liskov Substitution Principle</h4><p>It simply says your subclass should be able to replace your superclass.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*ozsleCqPZ-FGTD8C" /></figure><h4>I: Interface segregation principle</h4><p>Your interface should not force any class to implement something which it’s not going to use.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/0*gBg28C12Z60p1uni" /></figure><h4>D: Dependency inversion principle</h4><p>Your high-level modules should not directly depend on your low-level modules.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/0*OeroGAUe_3SypYBg" /></figure><p>These are the easiest principles that you can start with. Let me know if you want a detailed article on any one of these concepts.</p><p>Follow me to learn advanced concepts of programming in a non-boring way.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1c6b41fc7ef4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/indian-coder/5-oldest-tips-to-write-clean-code-1c6b41fc7ef4">5 oldest tips to write clean code.</a> was originally published in <a href="https://medium.com/indian-coder">Aesthetic coders</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Speech to text in a minute]]></title>
            <link>https://medium.com/indian-coder/speech-to-text-in-a-minute-e6d851f5e41e?source=rss-51fd6254162------2</link>
            <guid isPermaLink="false">https://medium.com/p/e6d851f5e41e</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[speech-recognition]]></category>
            <category><![CDATA[flutter-app-development]]></category>
            <category><![CDATA[services]]></category>
            <dc:creator><![CDATA[Md Sadab Wasim]]></dc:creator>
            <pubDate>Sat, 20 Aug 2022 05:05:46 GMT</pubDate>
            <atom:updated>2022-09-06T06:58:28.991Z</atom:updated>
            <content:encoded><![CDATA[<h4>Flutter implementation of speech-to-text functionality</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*H6bhWQ7rfr9PJkHQ" /><figcaption>Photo by <a href="https://unsplash.com/@omidarmin?utm_source=medium&amp;utm_medium=referral">Omid Armin</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>You want to add speech-to-text functionality in your app or just want to see how it’s done. Let’s see how to do it in flutter.</p><p><strong>Step 1: Add the plugin</strong></p><pre>speech_to_text: &lt;latest version&gt;</pre><p><strong>Step 2: Initialise it</strong></p><pre>bool _speechEnabled = false;<br>String _lastWords = &#39;&#39;;<br>final SpeechToText speechToText = SpeechToText();</pre><pre>Future&lt;void&gt; initSpeech() async {<br>_speechEnabled = await speechToText.initialize();<br>}</pre><p><strong>Step 3: Write the start and stop function</strong></p><pre>///Call when you want to listen <br>void startListening() async {<br>await speechToText.listen(<em>onResult</em>: _onSpeechResult);<br>}</pre><pre>///Call when you want to stop listening<br>void stopListening() async {<br>await speechToText.stop();<br>}</pre><pre>///It automatically get called when plugin recognize any word.<br>void _onSpeechResult(SpeechRecognitionResult <em>result</em>) {<br>_lastWords = <em>result</em>.recognizedWords;</pre><pre>//here you can do anything with recognize words.<br>}</pre><p><strong>Step 4: Check the status, if the plugin is enabled or not</strong></p><pre>String status() {</pre><pre>if (speechEnabled) {<br>return “Press the button to start speaking”;<br>} </pre><pre>else {<br>return “Speech not available”;<br>}</pre><pre>}</pre><p>That’s it, now you can directly use these functions with your UI class.</p><p>You can check this <a href="https://github.com/MDSADABWASIM/dictionary-app">repository </a>where I’m using this code.</p><p>See you guys in the next <strong>“in a minute”</strong> article.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DnMtU1hMIlxkjpYd" /><figcaption>Photo by <a href="https://unsplash.com/@goian?utm_source=medium&amp;utm_medium=referral">Ian Schneider</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e6d851f5e41e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/indian-coder/speech-to-text-in-a-minute-e6d851f5e41e">Speech to text in a minute</a> was originally published in <a href="https://medium.com/indian-coder">Aesthetic coders</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Supabase vs. Firebase: Why I Made the Switch]]></title>
            <link>https://medium.com/indian-coder/why-did-i-choose-supabase-over-firebase-467a7cf9c18?source=rss-51fd6254162------2</link>
            <guid isPermaLink="false">https://medium.com/p/467a7cf9c18</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[firebase]]></category>
            <category><![CDATA[supabase]]></category>
            <category><![CDATA[nosql]]></category>
            <category><![CDATA[sql]]></category>
            <dc:creator><![CDATA[Md Sadab Wasim]]></dc:creator>
            <pubDate>Thu, 16 Jun 2022 06:29:14 GMT</pubDate>
            <atom:updated>2024-06-25T04:14:08.528Z</atom:updated>
            <content:encoded><![CDATA[<p>Supabase is a new but better version of firebase.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9HPLfL3_qrGZe2rO2QbS2g.png" /></figure><ol><li><strong>You know what you will pay</strong></li></ol><p>It was one of the main pain points for me when using firebase, it’s so hard to calculate the price based on read/write calls, with Supabase’s pricing is more clear, they only charge for database storage and give unlimited API calls.</p><p><strong>2. Supabase support Postgress SQL database</strong></p><p>With SQL support you can write complex queries and everything is a breeze if you have already worked with SQL.</p><p><strong>3. Open source nature</strong></p><p>We all love open source software, Supabase is open source and we can see what is going on with the project, while this is not the case with firebase.</p><p><strong>4. Support of extensions and plugins for Postgres</strong></p><p>Supabase is pre-configured with over 50 extensions. You can also install your own SQL extensions directly into the database through the SQL editor.</p><p><strong>5. Performance</strong></p><p>Supabase team created a benchmarking repo where you can compare the performance of both services in different scenarios. Most recent results show that Supabase outperforms Firebase by up to 4x on the number of reads per second, and 3.1x on writes per second, you can check the benchmark <a href="https://github.com/supabase/benchmarks/issues/8">here</a>.</p><p>These are the reasons that led me to choose Supabase, but I will still say that Supabase has limited services, they just launched support for functions, while Firebase is a mature product and has tons of free services that can be a good decision maker like crashlytics, notification, etc. So choose wisely and see what you really need for your project.</p><p>Thanks for reading.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*I_PTEfA5TglnQTjR" /><figcaption>Photo by <a href="https://unsplash.com/@goian?utm_source=medium&amp;utm_medium=referral">Ian Schneider</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=467a7cf9c18" width="1" height="1" alt=""><hr><p><a href="https://medium.com/indian-coder/why-did-i-choose-supabase-over-firebase-467a7cf9c18">Supabase vs. Firebase: Why I Made the Switch</a> was originally published in <a href="https://medium.com/indian-coder">Aesthetic coders</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Playing small sounds in Flutter]]></title>
            <link>https://medium.com/indian-coder/playing-small-sounds-in-flutter-344a5fc722c2?source=rss-51fd6254162------2</link>
            <guid isPermaLink="false">https://medium.com/p/344a5fc722c2</guid>
            <category><![CDATA[appdevelopmentinbangalore]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[sound]]></category>
            <category><![CDATA[audio]]></category>
            <dc:creator><![CDATA[Md Sadab Wasim]]></dc:creator>
            <pubDate>Wed, 27 Apr 2022 07:43:28 GMT</pubDate>
            <atom:updated>2022-04-27T07:43:28.857Z</atom:updated>
            <content:encoded><![CDATA[<p>play sounds without any heavy libraries</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yEhCi78p-tUZmpuw" /><figcaption>Photo by <a href="https://unsplash.com/@icons8?utm_source=medium&amp;utm_medium=referral">Icons8 Team</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Oftentimes you want to play small sounds in your app when you are showing some dialog, snack bar, or notification and today I’ll tell you how to play small sounds efficiently.</p><p>install this lightweight plugin:</p><pre>soundpool: &lt;latest version&gt;</pre><p>once you have this plugin installed let’s make a sound service class.</p><pre>import ‘package:flutter/services.dart’;<br>import ‘package:soundpool/soundpool.dart’;</pre><pre>class SoundService {<br>Soundpool? pool;<br>int? soundId;</pre><pre>SoundService() {<br>init();<br>}</pre><pre>Future init() async {<br>pool = Soundpool.fromOptions();</pre><pre>soundId = await rootBundle<br>.load(“assets/sound/success_sound.mp3”) //your sound file name here<br>.then((ByteData <em>soundData</em>) {<br>return pool!.load(<em>soundData</em>);<br>});<br>}</pre><pre>playSound() {<br>pool!.play(soundId!);<br>}</pre><pre>}</pre><p>After writing this service initialize this service only once in your app, and whenever you want to play the sound just call the <strong>playSound </strong>method of this service.</p><p>In this way, we don’t have to use heavy libraries like <strong>audio_player </strong>to play a simple small sound and this implementation will make our app structure cleaner and more efficient.</p><h4>Thanks for reading,</h4><p>please applaud if you find this article useful.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=344a5fc722c2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/indian-coder/playing-small-sounds-in-flutter-344a5fc722c2">Playing small sounds in Flutter</a> was originally published in <a href="https://medium.com/indian-coder">Aesthetic coders</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Onesignal notification with Flutter in a minute]]></title>
            <link>https://medium.com/shipkaro/onesignal-notification-with-flutter-in-a-minute-3449fdf2c5f3?source=rss-51fd6254162------2</link>
            <guid isPermaLink="false">https://medium.com/p/3449fdf2c5f3</guid>
            <category><![CDATA[flutter-app-development]]></category>
            <category><![CDATA[notifications]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[firebasecloudmessaging]]></category>
            <category><![CDATA[onesignal]]></category>
            <dc:creator><![CDATA[Md Sadab Wasim]]></dc:creator>
            <pubDate>Sat, 16 Apr 2022 04:33:20 GMT</pubDate>
            <atom:updated>2022-04-17T04:58:29.323Z</atom:updated>
            <content:encoded><![CDATA[<p>send notification using device token Id</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qAiiSltzcDw9OT94e0vHeA.png" /></figure><p>You’ve probably heard about onesignal that’s why you’re here, it’s basically a firebase alternative to send notifications, let’s assume that you’ve already initialized onesignal and you got your app id (if not just go to the <a href="https://onesignal.com/">website </a>and do as they say).</p><p>add this plugin to your project</p><pre>onesignal_flutter: &lt;latest version&gt;</pre><p>Let’s build a service that will handle all the code related to onesignal, call it <strong>onesignal_service.dart</strong></p><pre>import &#39;package:onesignal_flutter/onesignal_flutter.dart&#39;;</pre><pre>class OneSignalService {<br>static OneSignal? _instance;</pre><pre>OneSignalSService() {<br>getInstance();<br>_instance!.setLogLevel(OSLogLevel.verbose, OSLogLevel.none);<br>_instance!.setAppId(&quot;ONESIGNAL APP ID&quot;);</pre><pre><em>// The promptForPushNotificationsWithUserResponse function will show the iOS push notification prompt. We recommend removing the following code and instead using an In-App Message to prompt for notification permission</em></pre><pre>_instance!.promptUserForPushNotificationPermission().then((<em>accepted</em>) {<br>print(&quot;Accepted permission: $<em>accepted</em>&quot;);<br>});</pre><pre>_instance!.setNotificationWillShowInForegroundHandler(<br>(OSNotificationReceivedEvent <em>event</em>) {</pre><pre><em>// Will be called whenever a notification is received in foreground<br>// Display Notification, pass null param for not displaying the notification</em></pre><pre><em>event</em>.complete(<em>event</em>.notification);<br>});</pre><pre>_instance!<br>.setNotificationOpenedHandler((OSNotificationOpenedResult <em>result</em>) {<br><em>// Will be called whenever a notification is opened/button pressed.<br></em>});</pre><pre>_instance!.setPermissionObserver((OSPermissionStateChanges <em>changes</em>) {<br><em>// Will be called whenever the permission changes<br>// (ie. user taps Allow on the permission prompt in iOS)</em></pre><pre>});<br>}</pre><pre>static OneSignal? getInstance() {<br>_instance ??= OneSignal.shared;<br>return _instance;<br>}</pre><pre>Future&lt;void&gt; getUserTokenId() async {<br>var deviceState = await _instance!.getDeviceState();<br>if (deviceState != null || deviceState?.userId != null) {<br>String tokenId = deviceState!.userId!;<br>print(&quot;TOKEN ID: &quot;+tokenId);<br>}<br>}</pre><pre>void handleSendNotification(<br>{required String t<em>okenId</em>,<br>required String <em>title</em>,<br>required String <em>desc</em>}) async {</pre><pre>var notification = OSCreateNotification(<br><em>playerIds</em>: [t<em>okenId</em>], <em>content</em>: <em>desc</em>, <em>heading</em>: <em>title</em>);<br>await _instance!.postNotification(notification);<br>}<br><br>}</pre><p><strong>send the notification from one device to another:</strong></p><ul><li>To send the notification you need the <strong>token id </strong>of the user to whom you want to send the <strong>notification</strong>.</li><li>To <strong>get the Token Id</strong> use the code below and make sure you add this token id to your database.</li></ul><pre>OneSignalService.getUserTokenId();</pre><p><strong>use the handleSendNotification method of your service to send notifications:</strong></p><pre>OneSignalService.handleSendNotification(<br>mentorTokenId: “tokenId”, <br>title:”notification title”,<br>desc:”notification desc”);</pre><blockquote>That’s it, hope you like this short on-point article.</blockquote><blockquote>Thankyou.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3449fdf2c5f3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/shipkaro/onesignal-notification-with-flutter-in-a-minute-3449fdf2c5f3">Onesignal notification with Flutter in a minute</a> was originally published in <a href="https://medium.com/shipkaro">shipkaro — my journey to $10k</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[5 concepts every Flutter dev should know]]></title>
            <link>https://medium.com/shipkaro/5-concepts-every-flutter-dev-should-know-48673ab074cb?source=rss-51fd6254162------2</link>
            <guid isPermaLink="false">https://medium.com/p/48673ab074cb</guid>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[code]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Md Sadab Wasim]]></dc:creator>
            <pubDate>Fri, 20 Aug 2021 05:56:36 GMT</pubDate>
            <atom:updated>2022-05-24T04:57:24.708Z</atom:updated>
            <content:encoded><![CDATA[<p>It will overall make you a good developer</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*hqaDd0qgGAnge9G_AN0i-g.jpeg" /></figure><p>I have been working with flutter for a long time, and these are the things that I discovered are must-haves for any flutter developer, it will overall make you a good flutter developer in a long run.</p><h3>1. State management architecture</h3><p>This is one of the most important topics in the flutter community, it is quite important if you want to maintain a mid or large-size flutter project. It will help to create a project smoothly and add new features flawlessly. I already wrote an article about why architecture in flutter is important and what architecture I chose, you can <a href="https://medium.com/indian-coder/flutter-architecture-that-i-adore-8139080abb">read it here</a>.</p><h3>2. Testing</h3><p>This is a single topic that I did not understand why it is important earlier in my career, but as I go ahead in my career and got experience with multiple projects and issues that came in a production environment. I have realized in a hard way why this is as important. If you still want more reason to consider testing, <a href="https://www.oreilly.com/library/view/clean-code-a/9780136083238/">Let this book from Uncle bob</a> convince you.</p><h3>3. IDE Shortcuts</h3><p>IDE shortcuts really? you must be thinking, this is one of the most important things that I need to learn. Let me explain why, we’re devs we spend most of our time writing code and debugging, which of course includes a keyboard and we want to use it as efficiently as possible. Studies show that using <strong>keyboard shortcuts</strong> allows working 10 times faster than using a mouse.</p><p><strong>Benefits:-</strong></p><ol><li>It saves you a ton of time.</li><li>It makes us productive and doesn’t let us lose focus.</li><li>And of course, it makes you look cool (in movies have you noticed actors never use a mouse)</li></ol><p>I prefer using <a href="https://code.visualstudio.com/">VS Code</a>, and I already wrote an article about my favorite vs code extension you can read <a href="https://medium.com/codechai/best-vs-code-extensions-for-mobile-devs-b09d68b00689">it here</a>.</p><p>For learning Ide shortcuts, <a href="https://www.youtube.com/watch?v=_4rSbklsVkk">this is one of the best video</a> which will help you learn it. For Android studio lovers <a href="https://poojabhaumik.medium.com/?p=2ef45c51085b">read this article</a>.</p><h3>4. Platform channel</h3><p>In mobile development even though we are using a cross-platform framework, we need to interact with multiple SDKs and libraries which are only available for the native platforms. Platform channel gives you the superpower to interact with native SDK. And I want you to have this superpower, if you are a beginner flutter dev almost in all interviews you will be asked if you’ve worked with native SDK using platform channel or not. It must be in your toolbox, I already wrote an article about building packages you <a href="https://medium.com/indian-coder/writing-flutter-package-in-an-easy-way-dc1e7410637d">can read it here</a>.</p><h3>5. Maintaining a project</h3><p>You have worked hard and made a full-fledged application, You published it in-store and there you go, you start to get feedback and issues from users that need to be solved or a feature that needs to be in your app these are common things that will come upon daily basis while you’re maintaining a project.</p><p>My suggestions for better app maintenance:-</p><ol><li>Always write tests, it’ll save you from issues and headaches in long run.</li><li>Focus on code coverage, with the coverage report you’ll know which code your tests are specifically covering and which part is not covered and cause issues later on.</li><li>I am reiterating here, choose a good architecture for your project and follow it.</li><li>Write strings, color codes, and styles on separate files as constant and reuse them.</li></ol><p>There are my top five suggestions for anyone who is into flutter development.</p><p>I frequently write articles about technology and my experiences with them, you can see all <a href="https://medium.com/@sadabwasim">my articles here</a>.</p><blockquote>Thanks for sharing your time with me, it means a lot.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qKUh_M_uDKNjjQdy" /><figcaption>Photo by <a href="https://unsplash.com/@goian?utm_source=medium&amp;utm_medium=referral">Ian Schneider</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=48673ab074cb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/shipkaro/5-concepts-every-flutter-dev-should-know-48673ab074cb">5 concepts every Flutter dev should know</a> was originally published in <a href="https://medium.com/shipkaro">shipkaro — my journey to $10k</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>