<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: GaNeShKuMaRm</title>
    <description>The latest articles on DEV Community by GaNeShKuMaRm (@ganeshkumarm1).</description>
    <link>https://dev.to/ganeshkumarm1</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F569735%2Fc85c1cdd-0887-4fa0-a69c-dbb516ebf8f1.jpeg</url>
      <title>DEV Community: GaNeShKuMaRm</title>
      <link>https://dev.to/ganeshkumarm1</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ganeshkumarm1"/>
    <language>en</language>
    <item>
      <title>Bringing Dark Theme to Medium in Chrome</title>
      <dc:creator>GaNeShKuMaRm</dc:creator>
      <pubDate>Fri, 29 Jan 2021 14:40:23 +0000</pubDate>
      <link>https://dev.to/ganeshkumarm1/bringing-dark-theme-to-medium-in-chrome-48dl</link>
      <guid>https://dev.to/ganeshkumarm1/bringing-dark-theme-to-medium-in-chrome-48dl</guid>
      <description>&lt;p&gt;I remember myself running the same script in my Chrome Console. Thanks to Chrome Dev Tool Snippets, now you can save and run your favorite and frequently used code snippets on any site in Chrome. The good thing is that these snippets are aware of the Javascript Context of the page.&lt;/p&gt;

&lt;p&gt;For this article, I wrote a script that will bring &lt;strong&gt;Dark Theme&lt;/strong&gt; to Medium web.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dfYS6etR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/9440/1%2An4Jx24W1dF0LIVMwHvhPqA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dfYS6etR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/9440/1%2An4Jx24W1dF0LIVMwHvhPqA.png" alt="Javascript Snippet for Medium Dark Theme"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First, we add the above snippet in Chrome and see if it is working.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Open Chrome Dev Tool by pressing &lt;strong&gt;Ctrl + Shift + Ins&lt;/strong&gt; or &lt;strong&gt;Right-click&lt;/strong&gt; and select &lt;strong&gt;Inspect&lt;/strong&gt;.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yyjqrCxp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/3840/1%2AilPvTWG62qZcao1v91u14w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yyjqrCxp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/3840/1%2AilPvTWG62qZcao1v91u14w.png" alt="Open Dev Tools"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click on the &lt;strong&gt;Sources&lt;/strong&gt; Tab. You can see a list of options on the left like Page, Filesystem, Overrides, etc.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PhrZiMyw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/3840/1%2AqfDPoWvoyx2JIJAaiM1dJw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PhrZiMyw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/3840/1%2AqfDPoWvoyx2JIJAaiM1dJw.png" alt="Switch to Sources Tab"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click the &lt;strong&gt;»&lt;/strong&gt; button and select &lt;strong&gt;Snippets&lt;/strong&gt;.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AEpl1abw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/3840/1%2AaIydbfFbSkUhWn9euYw0RQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AEpl1abw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/3840/1%2AaIydbfFbSkUhWn9euYw0RQ.png" alt="Select Snippets Option"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now click &lt;strong&gt;New snippet&lt;/strong&gt; to add a snippet. Give a meaningful name to the snippet. I am giving mine &lt;strong&gt;darkTheme&lt;/strong&gt;.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--E5JimJl0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/3866/1%2AUAqI5dTvUL2xziOEEWGQvQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--E5JimJl0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/3866/1%2AUAqI5dTvUL2xziOEEWGQvQ.png" alt="Add New Snippet"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now copy the below code from the &lt;a href="https://gist.github.com/ganeshkumarm1/69039d06017c188b307764455586860b"&gt;&lt;strong&gt;gist&lt;/strong&gt;&lt;/a&gt; and paste it in the editor. Now press &lt;strong&gt;Ctrl + S&lt;/strong&gt; to save the changes&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--318QPCK0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/9440/1%2ApPg1BYw1r8pirhLmLILtaA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--318QPCK0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/9440/1%2ApPg1BYw1r8pirhLmLILtaA.png" alt="Javascript Code for Dark Theme"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Open any medium article and open the snippet by following the above steps.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Right-click on the snippet and select &lt;strong&gt;Run&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Aahak54f--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/3840/1%2AFuHfA715QTMmlzGKDinI2g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Aahak54f--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/3840/1%2AFuHfA715QTMmlzGKDinI2g.png" alt="Run the snippet"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Voila, Now you can read Medium articles with Dark Theme.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--q4TW-Qjc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/7496/1%2AvYX3AfrXmL79rzegGnwX3w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--q4TW-Qjc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/7496/1%2AvYX3AfrXmL79rzegGnwX3w.png" alt="My [article ](https://medium.com/javarevisited/mos-algorithm-range-queries-made-easy-6c35047369ca)with and without Dark Theme"&gt;&lt;/a&gt;&lt;em&gt;My &lt;a href="https://medium.com/javarevisited/mos-algorithm-range-queries-made-easy-6c35047369ca"&gt;article &lt;/a&gt;with and without Dark Theme&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;And there you have it, your Medium in Dark Theme. Currently, Chrome doesn't have an option to run the script automatically but I hope we get the option in the future. Thank you for reading, I hope you found this article helpful!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.linkedin.com/in/ganesh-kumar-m-47b876111/"&gt;Linkedin &lt;/a&gt;| &lt;a href="https://github.com/ganeshkumarm1"&gt;Github&lt;/a&gt;&lt;/p&gt;

</description>
      <category>darktheme</category>
      <category>medium</category>
      <category>chrome</category>
      <category>devtool</category>
    </item>
    <item>
      <title>Minimal Switch in Flutter</title>
      <dc:creator>GaNeShKuMaRm</dc:creator>
      <pubDate>Fri, 29 Jan 2021 14:29:42 +0000</pubDate>
      <link>https://dev.to/ganeshkumarm1/minimal-switch-in-flutter-49b6</link>
      <guid>https://dev.to/ganeshkumarm1/minimal-switch-in-flutter-49b6</guid>
      <description>&lt;p&gt;In this article, we are going to create a minimal custom Switch Widget in Flutter. Flutter provides a built-in &lt;strong&gt;Switch Widget&lt;/strong&gt; which looks simple. We are going to create our own &lt;strong&gt;Flat Style&lt;/strong&gt; switch widget.&lt;/p&gt;

&lt;h3&gt;
  
  
  The switch has two parts:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The base&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The knob&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We will start writing code for the base and the knob separately.&lt;/p&gt;

&lt;h2&gt;
  
  
  Base
&lt;/h2&gt;

&lt;p&gt;The base is nothing but the background of the switch which is in a &lt;strong&gt;rounded rectangle&lt;/strong&gt; shape.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3208%2F1%2A4tn3qxEf3qEOtvIaXJ40kg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3208%2F1%2A4tn3qxEf3qEOtvIaXJ40kg.png" alt="Widget for Switch Base"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;AnimatedContainer&lt;/strong&gt;vis used instead of the container because we are going to add animations when the switch is turned ON and OFF.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;widget.value&lt;/strong&gt; holds either &lt;strong&gt;true&lt;/strong&gt; or &lt;strong&gt;false&lt;/strong&gt; which represents whether a switch is &lt;strong&gt;ON&lt;/strong&gt; or &lt;strong&gt;OFF&lt;/strong&gt; respectively&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The Knob
&lt;/h2&gt;

&lt;p&gt;The knob is the &lt;strong&gt;circular&lt;/strong&gt; button inside the base that we use to toggle the state of the switch.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F4264%2F1%2A0VUtnsZhd1Zm-Pj0jALP1w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F4264%2F1%2A0VUtnsZhd1Zm-Pj0jALP1w.png" alt="Widget for Switch Knob"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;AnimatedAlign&lt;/strong&gt; is used to animate the movement of the switch when the user clicks it.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The final output looks as follows:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2A-VpT6_RrlEAM3knJLfkVug.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2A-VpT6_RrlEAM3knJLfkVug.gif" alt="Final Output"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Take a look at the below Gist to view the full code with functionality:&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h2&gt;
  
  
  Wrapping Up
&lt;/h2&gt;

&lt;p&gt;Well, that’s everything! It’s a short and sweet tutorial but I hope you found it helpful.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.linkedin.com/in/ganesh-kumar-m-47b876111/" rel="noopener noreferrer"&gt;Linkedin &lt;/a&gt;| &lt;a href="https://github.com/ganeshkumarm1" rel="noopener noreferrer"&gt;Github&lt;/a&gt;&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>widget</category>
      <category>switch</category>
      <category>ui</category>
    </item>
  </channel>
</rss>
