<?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 Dev_with_Subham on Medium]]></title>
        <description><![CDATA[Stories by Dev_with_Subham on Medium]]></description>
        <link>https://medium.com/@devwithsubham007?source=rss-e8e2cb18259d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Fetu0g01e09xfTxQ</url>
            <title>Stories by Dev_with_Subham on Medium</title>
            <link>https://medium.com/@devwithsubham007?source=rss-e8e2cb18259d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 00:35:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@devwithsubham007/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[Mastering switch and Conditional Statements in Dart (In-Depth Guide) 2026]]></title>
            <link>https://medium.com/@devwithsubham007/mastering-switch-and-conditional-statements-in-dart-in-depth-guide-2026-fffba2d335eb?source=rss-e8e2cb18259d------2</link>
            <guid isPermaLink="false">https://medium.com/p/fffba2d335eb</guid>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[flutter-tutorialsd]]></category>
            <category><![CDATA[condition-statement]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[flutter-app-development]]></category>
            <dc:creator><![CDATA[Dev_with_Subham]]></dc:creator>
            <pubDate>Mon, 04 May 2026 18:33:38 GMT</pubDate>
            <atom:updated>2026-05-04T18:33:38.283Z</atom:updated>
            <content:encoded><![CDATA[<p>When writing logic in Dart, <strong>conditional statements</strong> are your decision-making backbone. Whether you’re building Flutter apps or backend services, understanding how to control program flow is essential.</p><p>In this blog, we’ll explore:</p><ul><li>if, else if, else</li><li>switch statement (deep dive)</li><li>Best practices</li><li>Real-world examples</li></ul><h3>1. Conditional Statements Overview</h3><p>Conditional statements allow your program to <strong>execute different code blocks based on conditions</strong>.</p><h3>Basic Syntax:</h3><pre>if (condition) {<br>  // runs if condition is true<br>} else if (anotherCondition) {<br>  // runs if anotherCondition is true<br>} else {<br>  // runs if none are true<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/564/1*dPn__ws9t38ur98awcSsJQ.png" /></figure><h3>2. if-else in Depth</h3><h3>Example 1: Simple Condition</h3><pre>void main() {<br>  int age = 18;<br><br>  if (age &gt;= 18) {<br>    print(&quot;You are an adult&quot;);<br>  } else {<br>    print(&quot;You are a minor&quot;);<br>  }<br>}</pre><p>Example 2: Multiple Conditions</p><pre>void main() {<br>  int marks = 75;<br><br>  if (marks &gt;= 90) {<br>    print(&quot;Grade A&quot;);<br>  } else if (marks &gt;= 70) {<br>    print(&quot;Grade B&quot;);<br>  } else if (marks &gt;= 50) {<br>    print(&quot;Grade C&quot;);<br>  } else {<br>    print(&quot;Fail&quot;);<br>  }<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/566/1*4c8oj_h_ZIqjURdO9gZ6OQ.png" /></figure><h3>3. Ternary Operator (Shortcut for if-else)</h3><p>A cleaner way to write small conditions:</p><pre>void main() {<br>  int age = 20;<br><br>  String result = age &gt;= 18 ? &quot;Adult&quot; : &quot;Minor&quot;;<br>  print(result);<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/971/1*ZQ2W3TW23v8IFAvQZD4Y2Q.png" /></figure><h3>4. switch Statement in Dart (Deep Dive)</h3><p>The switch statement is used when you have <strong>multiple fixed values to compare against a single variable</strong>.</p><p>Basic Syntax:</p><pre>switch (variable) {<br>  case value1:<br>    // code<br>    break;<br><br>  case value2:<br>    // code<br>    break;<br><br>  default:<br>    // fallback code<br>}<br></pre><p>Example 1: Day of Week</p><pre>void main() {<br>  String day = &quot;Monday&quot;;<br><br>  switch (day) {<br>    case &quot;Monday&quot;:<br>      print(&quot;Start of the week&quot;);<br>      break;<br><br>    case &quot;Friday&quot;:<br>      print(&quot;Weekend is near!&quot;);<br>      break;<br><br>    case &quot;Sunday&quot;:<br>      print(&quot;Holiday!&quot;);<br>      break;<br><br>    default:<br>      print(&quot;Regular day&quot;);<br>  }<br>}</pre><h3>Important Rules of switch</h3><h3>1. break is Mandatory</h3><p>Without break, execution continues to the next case.</p><h3>2. default Case</h3><p>Acts like an else block.</p><h3>3. Works with:</h3><ul><li>int</li><li>String</li><li>enum</li></ul><h3>Example 2: Using Enum (Best Practice)</h3><pre>enum Weather { sunny, rainy, cloudy }<br><br>void main() {<br>  Weather today = Weather.sunny;<br><br>  switch (today) {<br>    case Weather.sunny:<br>      print(&quot;Wear sunglasses&quot;);<br>      break;<br><br>    case Weather.rainy:<br>      print(&quot;Take an umbrella&quot;);<br>      break;<br><br>    case Weather.cloudy:<br>      print(&quot;Might rain later&quot;);<br>      break;<br>  }<br>}</pre><h3>Modern Dart (Pattern Matching in Switch)</h3><p>Dart has evolved! Newer versions support <strong>pattern matching</strong> in switch.</p><h3>Example:</h3><pre>void main() {<br>  var value = 10;<br><br>  switch (value) {<br>    case &gt;= 0 &amp;&amp; &lt;= 10:<br>      print(&quot;Between 0 and 10&quot;);<br>      break;<br><br>    case &gt; 10 &amp;&amp; &lt;= 20:<br>      print(&quot;Between 11 and 20&quot;);<br>      break;<br><br>    default:<br>      print(&quot;Out of range&quot;);<br>  }<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/469/1*N2WIkaCNtgdeTVGtcgT3uw.png" /></figure><h3>5. <strong>if-else vs </strong><strong>switch</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/506/1*p0f2JWjUiUpQfPkggBxcpA.png" /></figure><h3>6. When to Use What?</h3><h3>Use if-else when:</h3><ul><li>You have <strong>ranges</strong> (&gt;, &lt;)</li><li>Complex logic</li><li>Multiple variables</li></ul><h3>Use switch when:</h3><ul><li>Comparing <strong>one variable</strong></li><li>Fixed values</li><li>Cleaner code is needed</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/439/1*sPSPILrtUv3pGd7eDJYyag.png" /></figure><h3>7. Real-World Example</h3><pre>void main() {<br>  String role = &quot;admin&quot;;<br><br>  switch (role) {<br>    case &quot;admin&quot;:<br>      print(&quot;Full access granted&quot;);<br>      break;<br><br>    case &quot;user&quot;:<br>      print(&quot;Limited access&quot;);<br>      break;<br><br>    case &quot;guest&quot;:<br>      print(&quot;Read-only access&quot;);<br>      break;<br><br>    default:<br>      print(&quot;Unknown role&quot;);<br>  }<br>}</pre><h3>Common Mistakes</h3><ul><li>Forgetting break</li><li>Using switch for ranges (use if instead)</li><li>Not handling default cases</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/529/1*NqkxM1HEGjH3f4sNRheUpw.png" /></figure><h3>Conclusion</h3><p>Mastering conditional statements in Dart helps you:</p><ul><li>Write cleaner logic</li><li>Improve performance</li><li>Build scalable applications</li></ul><p><strong>Quick Tip:</strong><br> Use switch for clarity when dealing with fixed values, and if-else for flexibility.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fffba2d335eb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter/Dart Collections: Mastering List, Set, and Map Complete Guide with Practical Code Examples]]></title>
            <link>https://medium.com/@devwithsubham007/flutter-dart-collections-mastering-list-set-and-map-complete-guide-with-practical-code-examples-df5549c9c343?source=rss-e8e2cb18259d------2</link>
            <guid isPermaLink="false">https://medium.com/p/df5549c9c343</guid>
            <category><![CDATA[flutter-app-development]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[dart-tutorial]]></category>
            <category><![CDATA[flutter-widget]]></category>
            <dc:creator><![CDATA[Dev_with_Subham]]></dc:creator>
            <pubDate>Fri, 01 May 2026 06:48:52 GMT</pubDate>
            <atom:updated>2026-05-01T06:53:21.761Z</atom:updated>
            <content:encoded><![CDATA[<p>Collections are fundamental in any programming language, and <a href="https://dart.dev/">Dart </a>(the language behind <a href="https://flutter.dev/">Flutter</a>) provides powerful, easy-to-use data structures: List, Set, and Map. In this blog, we’ll focus heavily on List operations as requested, while also covering the basics of Set and Map. For more <a href="https://flutterfever.com/">visit</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/784/1*sRTrSP_b9Xz6ZcaeTd7oiQ.jpeg" /></figure><h3>1. Introduction to Collections</h3><pre>// List - Ordered collection that allows duplicates<br>List&lt;String&gt; names = [&#39;Alice&#39;, &#39;Bob&#39;, &#39;Charlie&#39;];<br><br>// Set - Unordered collection with unique elements only<br>Set&lt;int&gt; numbers = {1, 2, 3, 2}; // 2 will appear only once<br><br>// Map - Key-Value pairs (like dictionary)<br>Map&lt;String, dynamic&gt; user = {<br>  &#39;name&#39;: &#39;Subham&#39;,<br>  &#39;age&#39;: 25,<br>  &#39;city&#39;: &#39;Delhi&#39;<br>};</pre><p><strong>When to use what?</strong></p><ul><li>Use <strong>List</strong> when order matters and duplicates are allowed.</li><li>Use <strong>Set</strong> when you need uniqueness.</li><li>Use <strong>Map</strong> when you need key-based lookup.</li></ul><h3>2. Working with Lists in Flutter/Dart</h3><h4>Declaring <a href="https://flutterfever.com/what-is-dart-lists-how-many-types-of-lists-in-dart/">Lists</a></h4><pre>// Mutable List<br>List&lt;String&gt; fruits = [&#39;Apple&#39;, &#39;Banana&#39;, &#39;Mango&#39;];<br><br>// Empty List<br>List&lt;int&gt; scores = [];<br>List&lt;int&gt; scores2 = &lt;int&gt;[]; // Generic way<br><br>// Fixed length list (less common in Flutter)<br>List&lt;String&gt; fixed = List.filled(5, &#39;Default&#39;);</pre><p>Adding Data to List.<a href="https://flutterfever.com/what-is-dart-lists-how-many-types-of-lists-in-dart/">For more information Visit</a></p><pre>void main() {<br>  List&lt;String&gt; fruits = [&#39;Apple&#39;];<br><br>  // Add single item<br>  fruits.add(&#39;Banana&#39;);<br>  fruits.add(&#39;Mango&#39;);<br><br>  // Add multiple items<br>  fruits.addAll([&#39;Orange&#39;, &#39;Grapes&#39;, &#39;Pineapple&#39;]);<br><br>  // Insert at specific position<br>  fruits.insert(0, &#39;Kiwi&#39;);           // at beginning<br>  fruits.insert(2, &#39;Cherry&#39;);         // at index 2<br><br>  print(fruits);<br>  // Output: [Kiwi, Apple, Cherry, Banana, Mango, Orange, Grapes, Pineapple]<br>}</pre><p>Removing Data from List.<a href="https://flutterfever.com/what-is-dart-lists-how-many-types-of-lists-in-dart/">For more information Visit</a></p><pre>List&lt;String&gt; fruits = [&#39;Apple&#39;, &#39;Banana&#39;, &#39;Mango&#39;, &#39;Orange&#39;, &#39;Banana&#39;];<br><br>fruits.remove(&#39;Banana&#39;);           // removes first occurrence<br>fruits.removeAt(0);                // remove by index<br>fruits.removeLast();               // remove last item<br>fruits.removeRange(1, 3);          // remove from index 1 to 3 (exclusive)<br>fruits.removeWhere((fruit) =&gt; fruit.startsWith(&#39;M&#39;)); // conditional remove<br><br>// Clear entire list<br>fruits.clear();</pre><p>Updating Data in List</p><pre>List&lt;String&gt; fruits = [&#39;Apple&#39;, &#39;Banana&#39;, &#39;Mango&#39;];<br><br>fruits[1] = &#39;Blueberry&#39;;           // Update by index<br><br>// Update with conditions<br>for (int i = 0; i &lt; fruits.length; i++) {<br>  if (fruits[i] == &#39;Mango&#39;) {<br>    fruits[i] = &#39;Pineapple&#39;;<br>  }<br>}<br><br>// Or using map (creates new list)<br>List&lt;String&gt; upperFruits = fruits.map((fruit) =&gt; fruit.toUpperCase()).toList();</pre><p>Getting Data from List &amp; Adding to Another List.<a href="https://flutterfever.com/what-is-dart-lists-how-many-types-of-lists-in-dart/">For more information Visit</a></p><pre>List&lt;String&gt; allFruits = [&#39;Apple&#39;, &#39;Banana&#39;, &#39;Mango&#39;, &#39;Orange&#39;, &#39;Kiwi&#39;];<br><br>// Get single item<br>String first = allFruits[0];<br>String second = allFruits[1];<br><br>// Get sublist<br>List&lt;String&gt; favorite = allFruits.sublist(1, 4); // Banana, Mango, Orange<br><br>// Create new list and add items<br>List&lt;String&gt; myFruits = [];<br>myFruits.addAll(allFruits.where((fruit) =&gt; fruit.length &gt; 5)); // long names only<br><br>// Spread operator (very useful in Flutter)<br>List&lt;String&gt; combined = [...myFruits, &#39;Dragonfruit&#39;, ...favorite];</pre><p>Comparing Two Lists. <a href="https://flutterfever.com/what-is-dart-lists-how-many-types-of-lists-in-dart/">For more information Visit</a></p><pre>List&lt;int&gt; list1 = [1, 2, 3, 4];<br>List&lt;int&gt; list2 = [1, 2, 3, 4];<br>List&lt;int&gt; list3 = [4, 3, 2, 1];<br><br>bool isEqual1 = list1.equals(list2);           // true (using extension or package)<br>bool isEqual2 = list1.toString() == list2.toString(); // simple way<br><br>// Best way - using package or manual check<br>bool areListsEqual(List a, List b) {<br>  if (a.length != b.length) return false;<br>  for (int i = 0; i &lt; a.length; i++) {<br>    if (a[i] != b[i]) return false;<br>  }<br>  return true;<br>}<br><br>// Check if lists contain same elements (order doesn&#39;t matter)<br>bool sameElements = list1.toSet().containsAll(list2.toSet()) &amp;&amp; <br>                   list2.toSet().containsAll(list1.toSet());</pre><p>Note: Dart doesn’t have built-in .equals() for lists by default. You can use the collection package or the methods shown above.</p><p>3. Quick Overview of Set. <a href="https://flutterfever.com/what-is-dart-lists-how-many-types-of-lists-in-dart/">For more information Visit</a></p><pre>Set&lt;int&gt; uniqueNumbers = {1, 2, 3, 3, 4}; // {1,2,3,4}<br><br>uniqueNumbers.add(5);<br>uniqueNumbers.add(2); // won&#39;t add duplicate<br><br>// Convert List to Set<br>List&lt;int&gt; numbers = [1,1,2,3,3];<br>Set&lt;int&gt; unique = numbers.toSet();</pre><p>4. Quick Overview of Map. <a href="https://flutterfever.com/what-is-dart-lists-how-many-types-of-lists-in-dart/">For more information Visit</a></p><pre>Map&lt;String, dynamic&gt; profile = {<br>  &#39;name&#39;: &#39;Dev_Subham&#39;,<br>  &#39;city&#39;: &#39;Delhi&#39;,<br>  &#39;skills&#39;: [&#39;Flutter&#39;, &#39;Dart&#39;]<br>};<br><br>// Add/Update<br>profile[&#39;age&#39;] = 25;<br>profile[&#39;city&#39;] = &#39;New Delhi&#39;;<br><br>// Get value<br>String name = profile[&#39;name&#39;] ?? &#39;Guest&#39;;<br><br>// Remove<br>profile.remove(&#39;age&#39;);</pre><p>Practical Flutter Example (Stateful Widget)</p><pre>class ListExample extends StatefulWidget {<br>  @override<br>  _ListExampleState createState() =&gt; _ListExampleState();<br>}<br><br>class _ListExampleState extends State&lt;ListExample&gt; {<br>  List&lt;String&gt; tasks = [&#39;Buy milk&#39;, &#39;Walk dog&#39;];<br><br>  void addTask(String task) {<br>    setState(() {<br>      tasks.add(task);<br>    });<br>  }<br><br>  void removeTask(int index) {<br>    setState(() {<br>      tasks.removeAt(index);<br>    });<br>  }<br><br>  @override<br>  Widget build(BuildContext context) {<br>    return ListView.builder(<br>      itemCount: tasks.length,<br>      itemBuilder: (context, index) {<br>        return ListTile(<br>          title: Text(tasks[index]),<br>          trailing: IconButton(<br>            icon: Icon(Icons.delete),<br>            onPressed: () =&gt; removeTask(index),<br>          ),<br>        );<br>      },<br>    );<br>  }<br>}</pre><h3>Best Practices &amp; Tips</h3><ol><li>Use const for immutable lists when possible (const List = [‘a’, ‘b’];).</li><li>Prefer final for lists that won’t be reassigned.</li><li>For large lists and performance, consider using packages like fast_immutable_collections.</li><li>Always use setState() when modifying lists in Stateful widgets.</li><li>Use spread operator (…) and collection if/for for clean UI code.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=df5549c9c343" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Basic Dart Programming: Hello World and Variables Explained (with Code Examples)]]></title>
            <link>https://medium.com/@devwithsubham007/basic-dart-programming-hello-world-and-variables-explained-with-code-examples-e12f9b5eee78?source=rss-e8e2cb18259d------2</link>
            <guid isPermaLink="false">https://medium.com/p/e12f9b5eee78</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[flutter-app-development]]></category>
            <category><![CDATA[dart-programming-language]]></category>
            <category><![CDATA[dart-variable]]></category>
            <dc:creator><![CDATA[Dev_with_Subham]]></dc:creator>
            <pubDate>Wed, 29 Apr 2026 18:16:21 GMT</pubDate>
            <atom:updated>2026-04-30T05:38:44.499Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://dart.dev/">Dart </a>is a modern, object-oriented programming language developed by Google. It is primarily used for building <a href="https://docs.flutter.dev/?_gl=1*43tui6*_ga*MTI4ODA5MDgxMi4xNzM3MDk1MjYw*_ga_04YGWK0175*czE3Nzc0ODYxMDQkbzIwJGcwJHQxNzc3NDg2MTA0JGo2MCRsMCRoMA.."><strong>Flutter</strong> </a>mobile, web, and desktop applications. Dart is clean, fast, and comes with strong <strong>null safety</strong> (introduced in Dart 2.12+), which helps prevent null pointer exceptions at compile time. This <a href="https://flutterfever.com/category/flutter-ui-management/baic-flutter-tutorial/">Flutter Tutorial</a> is best for beginners.</p><p>In this beginner-friendly guide, we’ll cover:</p><ul><li>Writing your first Dart program (Hello World)</li><li>What are variables in Dart?</li><li>Different ways to declare variables</li><li>Common data types</li><li>var, dynamic, final, const, and null safety</li></ul><h4>1. Setting Up Dart</h4><p>You can run Dart code online using <a href="https://dartpad.dev/"><strong>DartPad</strong> </a>(dart.dev) or install the Dart SDK locally.</p><p>2. Your First Dart Program — Hello World</p><pre>void main() {<br>  print(&#39;Hello, World!&#39;);<br>}</pre><p><strong>Explanation:</strong></p><ul><li>Every Dart program starts with the main() function — this is the entry point.</li><li>void means the function doesn’t return any value.</li><li>print() is used to output text to the console.</li></ul><p>Save this as hello.dart and run it using:</p><pre>dart run hello.dart</pre><h4>3. What are Variables in Dart?</h4><p>A <strong>variable</strong> is a named storage location in memory that holds a value. In Dart, variables store <strong>references</strong> to objects.</p><p><strong>Basic Syntax:</strong></p><pre>type variableName = value;</pre><h4>4. Declaring Variables in Dart</h4><p>Dart offers several ways to declare variables:</p><p>a) Explicit Type Declaration</p><pre>String name = &quot;Subham&quot;;<br>int age = 25;<br>double height = 5.9;<br>bool isStudent = true;</pre><p>b) Using var (Type Inference)</p><p><a href="https://flutterfever.com/">Dart</a> can automatically infer the type from the initial value.</p><pre>var name = &quot;Dev_Subham&quot;;     // Inferred as String<br>var age = 25;                // Inferred as int<br>var price = 99.99;           // Inferred as double</pre><p>Note: Once inferred, the type is fixed. You cannot assign a different type later.</p><p>c) Using dynamic</p><p>dynamic allows the variable to change its type at runtime (not recommended unless necessary).</p><pre>dynamic variable = &quot;Hello&quot;;<br>print(variable);        // Hello<br><br>variable = 100;<br>print(variable);        // 100<br><br>variable = true;<br>print(variable);        // true</pre><p>d) final vs const</p><ul><li><strong>final</strong>: The value can be set only <strong>once</strong> (at runtime).</li><li><strong>const</strong>: The value must be known at <strong>compile-time</strong> (compile-time constant).</li></ul><pre>final String country = &quot;India&quot;;     // Can be assigned at runtime<br><br>const double pi = 3.14159;          // Must be known at compile time<br><br>// Example of final<br>final DateTime now = DateTime.now();   // Allowed<br><br>// const DateTime now = DateTime.now(); // Error - not compile-time constant</pre><p><a href="https://flutterfever.com/"><strong>Best Practice</strong></a><strong>:</strong></p><ul><li>Use const whenever possible for better performance.</li><li>Use final for variables that won’t change after initialization.</li><li>Prefer explicit types or var + type inference in most cases.</li></ul><h4>5. Common Data Types in Dart</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/784/1*TgwJtNx_1iT1NBAIR5GLXA.jpeg" /></figure><p>String examples:</p><pre>String firstName = &quot;Subham&quot;;<br>String lastName = &#39;Dev&#39;;<br><br>String fullName = &quot;$firstName $lastName&quot;;   // String interpolation<br>print(fullName);   // Subham Dev<br><br>String multiLine = &#39;&#39;&#39;<br>This is a <br>multi-line string<br>&#39;&#39;&#39;;</pre><h4>6. Null Safety in Dart (Very Important!)</h4><p>Since Dart 2.12, all types are <strong>non-nullable</strong> by default.</p><pre>String name = &quot;Subham&quot;;     // Cannot be null<br>// name = null;             // Error!<br><br>String? nullableName;       // Nullable type (can be null)<br>nullableName = null;<br><br>print(nullableName);        // null</pre><p>Null assertion (!) — Use carefully:</p><pre>String? name = &quot;Dev_Subham&quot;;<br>print(name!);               // Tells Dart: &quot;I know it&#39;s not null&quot;</pre><p>Null-aware operators:</p><pre>String? name;<br><br>// Null coalescing operator<br>String displayName = name ?? &quot;Guest&quot;;<br><br>// Null-aware method call<br>print(name?.toUpperCase());</pre><p>7. Complete Example Program</p><pre>void main() {<br>  String name = &quot;Dev_Subham&quot;;<br>  int age = 25;<br>  double salary = 75000.50;<br>  bool isDeveloper = true;<br><br>  final String city = &quot;Delhi&quot;;<br>  const double gstRate = 0.18;<br><br>  print(&quot;Name: $name&quot;);<br>  print(&quot;Age: $age&quot;);<br>  print(&quot;Lives in: $city&quot;);<br>  print(&quot;GST Rate: ${gstRate * 100}%&quot;);<br>}</pre><h4>8<a href="https://flutterfever.com/">. Best Practices</a> for Variables in Dart</h4><ol><li>Use <strong>type inference</strong> (var) when the type is obvious.</li><li>Prefer <strong>explicit types</strong> in public APIs or complex code.</li><li>Use final and const as much as possible for immutability.</li><li>Avoid dynamic unless you really need runtime type flexibility.</li><li>Always handle <strong>null safety</strong> properly to avoid runtime crashes.</li><li>Follow naming conventions: camelCase for variables and functions.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e12f9b5eee78" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter Tutorial: Mastering ListView.builder,]]></title>
            <link>https://medium.com/@devwithsubham007/flutter-tutorial-mastering-flutter-tutorial-mastering-listview-builder-5e5b9da7cf32?source=rss-e8e2cb18259d------2</link>
            <guid isPermaLink="false">https://medium.com/p/5e5b9da7cf32</guid>
            <category><![CDATA[flutter-ui]]></category>
            <category><![CDATA[flutter-widget]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[flutter-app-development]]></category>
            <dc:creator><![CDATA[Dev_with_Subham]]></dc:creator>
            <pubDate>Sun, 26 Apr 2026 19:12:04 GMT</pubDate>
            <atom:updated>2026-04-27T10:34:21.184Z</atom:updated>
            <content:encoded><![CDATA[<h3>Flutter Tutorial: Mastering ListView.builder, GridView.builder, BottomNavigationBar, FloatingActionButton &amp; ExpansionTile</h3><p>Build dynamic, expandable lists and grids with responsive navigation and actions</p><p>If you’re building a <a href="https://flutter.dev/">Flutter</a> app, you’ll often need to display scrollable data, let users navigate between screens, provide a quick action button, and sometimes show extra content on demand. Today, we’ll combine five essential widgets into one practical example:</p><ul><li><a href="https://flutterfever.com/flutter-for-beginners-build-first-app/">ListView.builder</a> – efficient vertical lists</li><li>GridView.builder – flexible, responsive grids</li><li>BottomNavigationBar – tab-like navigation</li><li>FloatingActionButton – a prominent action button</li><li>ExpansionTile – expandable/collapsible list items</li></ul><p>By the end, you’ll have a working app that switches between a list and a grid, adds new items, and expands each list item to reveal additional information.</p><h3>What We’ll Build</h3><p>A simple demo app with two tabs:</p><ol><li>List View — vertical list with expandable tiles (using ExpansionTile) that show hidden details when tapped.</li><li>Grid View — same items in a 2‑column grid (no expansion in grid, for simplicity).</li></ol><p>A FloatingActionButton at the bottom‑right adds a new item (e.g., “Item 5”, “Item 6”, …) to both views. The BottomNavigationBar switches between layouts.</p><p>We’ll also understand why ExpansionTile is handy for nesting content without cluttering the UI.</p><h3>1. Setting Up a New Flutter Project</h3><p>Create a new Flutter project:</p><pre>flutter create list_grid_demo<br>cd list_grid_demo</pre><p>Open lib/main.dart and replace everything with the code we’ll build below.</p><h3>2. The Complete Code</h3><p>Copy the following code into lib/main.dart. I’ve added detailed comments so you can follow along.</p><pre>import &#39;package:flutter/material.dart&#39;;<br><br>void main() =&gt; runApp(const MyApp());<br><br>class MyApp extends StatelessWidget {<br>  const MyApp({super.key});<br><br>  @override<br>  Widget build(BuildContext context) {<br>    return MaterialApp(<br>      title: &#39;ExpansionTile Demo&#39;,<br>      theme: ThemeData(primarySwatch: Colors.teal),<br>      home: const MyHomePage(),<br>    );<br>  }<br>}<br><br>class MyHomePage extends StatefulWidget {<br>  const MyHomePage({super.key});<br><br>  @override<br>  State&lt;MyHomePage&gt; createState() =&gt; _MyHomePageState();<br>}<br><br>class _MyHomePageState extends State&lt;MyHomePage&gt; {<br>  // Shared data source<br>  List&lt;String&gt; items = [&#39;Item 1&#39;, &#39;Item 2&#39;, &#39;Item 3&#39;, &#39;Item 4&#39;];<br><br>  int _selectedIndex = 0; // 0 = list, 1 = grid<br><br>  void _addItem() {<br>    setState(() {<br>      items.add(&#39;Item ${items.length + 1}&#39;);<br>    });<br>  }<br><br>  // Build the list view with ExpansionTile<br>  Widget _buildListView() {<br>    return ListView.builder(<br>      padding: const EdgeInsets.all(8),<br>      itemCount: items.length,<br>      itemBuilder: (context, index) {<br>        return Card(<br>          margin: const EdgeInsets.symmetric(vertical: 6),<br>          child: ExpansionTile(<br>            leading: const Icon(Icons.list),<br>            title: Text(items[index]),<br>            trailing: IconButton(<br>              icon: const Icon(Icons.delete, color: Colors.red),<br>              onPressed: () {<br>                setState(() {<br>                  items.removeAt(index);<br>                });<br>              },<br>            ),<br>            children: [<br>              Padding(<br>                padding: const EdgeInsets.all(16.0),<br>                child: Column(<br>                  crossAxisAlignment: CrossAxisAlignment.start,<br>                  children: [<br>                    Text(&#39;Details for ${items[index]}&#39;,<br>                        style: const TextStyle(fontWeight: FontWeight.bold)),<br>                    const SizedBox(height: 8),<br>                    Text(&#39;• Created: ${DateTime.now().toLocal()}&#39;),<br>                    const Text(&#39;• Status: Active&#39;),<br>                    const Text(&#39;• Priority: Medium&#39;),<br>                    const SizedBox(height: 8),<br>                    ElevatedButton(<br>                      onPressed: () {<br>                        // Example action<br>                        ScaffoldMessenger.of(context).showSnackBar(<br>                          SnackBar(content: Text(&#39;You clicked ${items[index]}&#39;)),<br>                        );<br>                      },<br>                      child: const Text(&#39;Do Something&#39;),<br>                    ),<br>                  ],<br>                ),<br>              ),<br>            ],<br>          ),<br>        );<br>      },<br>    );<br>  }<br><br>  // Grid view (no expansion for simplicity)<br>  Widget _buildGridView() {<br>    return GridView.builder(<br>      padding: const EdgeInsets.all(8),<br>      gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(<br>        crossAxisCount: 2,<br>        crossAxisSpacing: 8,<br>        mainAxisSpacing: 8,<br>        childAspectRatio: 1.2,<br>      ),<br>      itemCount: items.length,<br>      itemBuilder: (context, index) {<br>        return Card(<br>          color: Colors.teal.shade50,<br>          child: Column(<br>            mainAxisAlignment: MainAxisAlignment.center,<br>            children: [<br>              const Icon(Icons.grid_on, size: 40),<br>              const SizedBox(height: 8),<br>              Text(items[index]),<br>              IconButton(<br>                icon: const Icon(Icons.delete, size: 20, color: Colors.red),<br>                onPressed: () {<br>                  setState(() {<br>                    items.removeAt(index);<br>                  });<br>                },<br>              ),<br>            ],<br>          ),<br>        );<br>      },<br>    );<br>  }<br><br>  @override<br>  Widget build(BuildContext context) {<br>    return Scaffold(<br>      appBar: AppBar(<br>        title: const Text(&#39;ExpansionTile &amp; Grid Demo&#39;),<br>        backgroundColor: Theme.of(context).primaryColor,<br>      ),<br>      body: _selectedIndex == 0 ? _buildListView() : _buildGridView(),<br>      bottomNavigationBar: BottomNavigationBar(<br>        currentIndex: _selectedIndex,<br>        onTap: (index) {<br>          setState(() {<br>            _selectedIndex = index;<br>          });<br>        },<br>        items: const [<br>          BottomNavigationBarItem(<br>            icon: Icon(Icons.view_list),<br>            label: &#39;List (Expandable)&#39;,<br>          ),<br>          BottomNavigationBarItem(<br>            icon: Icon(Icons.grid_on),<br>            label: &#39;Grid View&#39;,<br>          ),<br>        ],<br>      ),<br>      floatingActionButton: FloatingActionButton(<br>        onPressed: _addItem,<br>        child: const Icon(Icons.add),<br>      ),<br>    );<br>  }<br>}</pre><h3>3. Understanding the Key Widgets</h3><h3>ListView.builder</h3><pre>ListView.builder(<br>  itemCount: items.length,<br>  itemBuilder: (context, index) =&gt; ...<br>)</pre><ul><li>Builds children only when they scroll into view — perfect for long lists</li><li>itemCount defines how many items exist.</li><li>itemBuilder is called repeatedly for each index.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/503/1*ONAt51FqrTtgi7mKr46yog.png" /></figure><h3>GridView.builder</h3><pre>GridView.builder(<br>  gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2),<br>  itemBuilder: ...<br>)</pre><ul><li>Similar efficiency but creates a 2D grid.</li><li>gridDelegate controls number of columns, spacing, and aspect ratio.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/1*nUB-DgfS_86nLSzdkXmXVg.png" /></figure><h3>BottomNavigationBar</h3><pre>bottomNavigationBar: BottomNavigationBar(<br>  currentIndex: _selectedIndex,<br>  onTap: (index) =&gt; setState(() =&gt; _selectedIndex = index),<br>  items: [...]<br>)</pre><ul><li>Provides two tabs (list / grid).</li><li>currentIndex and onTap switch the active body.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5b3jD9Yw8WUab8YX5TqGdg.png" /></figure><h3>FloatingActionButton</h3><pre>floatingActionButton: FloatingActionButton(<br>  onPressed: _addItem,<br>  child: Icon(Icons.add),<br>)</pre><ul><li>A circular button that floats above the content.</li><li>Here, it adds a new item to the shared list.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/479/1*0jPPPZapb1QJZ-Z4xBV9RA.png" /></figure><blockquote><em>All buttons and tabs update the UI using </em><em>setState(). In a real app, you might use a state management solution like Provider or Riverpod.</em></blockquote><h3>ExpansionTile</h3><p>What it does:</p><ul><li>Looks like a ListTile but has a chevron icon on the left/right.</li><li>When tapped, it expands to show the children widgets.</li><li>When tapped again, it collapses.</li></ul><p>Why use it?</p><ul><li>Saves screen space — hide extra details behind a tap.</li><li>Great for FAQs, nested settings, product details, comments, etc.</li><li>Fully customizable — you can put any widget inside children.</li></ul><p>In our code, each ExpansionTile shows:</p><ul><li>A delete button (still accessible without expanding)</li><li>Expanded content: creation timestamp, status, priority, and a button.</li></ul><blockquote><em>Important: The </em><em>trailing property accepts a widget that stays visible even when collapsed. Here we used an </em><em>IconButton to delete the item.</em></blockquote><h3>4. How ExpansionTile Works With State</h3><p>Because the ExpansionTile manages its own open/closed state internally, you don’t need any extra setState to handle expansion. However, when you delete an item (via the trailing button) or add a new one (via FAB), the entire list rebuilds – that’s why we wrap items.removeAt and items.add inside setState.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/546/1*Rbsr5FzJ4R3ZSqO1xs2Bdw.png" /></figure><h3>Customizing &amp; Next Steps</h3><p>You can easily modify this code to build real apps:</p><ul><li>Replace items with data from an API (using FutureBuilder).</li><li>Add different FAB actions per tab.</li><li>Implement pull‑to‑refresh with RefreshIndicator.</li><li>Navigate to a detail screen when an item is tapped.</li></ul><h3>Challenge for you:</h3><ul><li>Change the grid to 3 columns on tablets.</li><li>Add a “clear all” button in the AppBar.</li><li>Animate the addition of new items.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c07fd-27fYItWVG9ewGVVA.png" /></figure><h3>Final Words</h3><p>You’ve just learned how to use four essential Flutter widgets together. ListView.builder and GridView.builder keep your app performant, while BottomNavigationBar and FloatingActionButton provide a modern, user‑friendly interface.</p><p>If this tutorial helped you, give it 50 claps and share it with other Flutter developers!</p><p>Have questions? Drop a comment below — I read every one.</p><p>Happy Fluttering!</p><h3>Appendix: Running the Code</h3><ol><li>Make sure Flutter is installed (flutter doctor).</li><li>Create a new project or replace lib/main.dart with the code above.</li><li>Run flutter pub get (if needed) then flutter run.</li><li>Test on an emulator or real device.</li></ol><p>That’s it! Copy this into Medium, add your own screenshots, and publish. You’ll have a clean, professional <a href="https://flutterfever.com/">Flutter tutorial </a>ready in under 30 minutes.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5e5b9da7cf32" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Top 10 Basic Flutter Widgets Every Beginner Should Know (With Code Examples)]]></title>
            <link>https://medium.com/@devwithsubham007/top-10-basic-flutter-widgets-every-beginner-should-know-with-code-examples-7552f8888754?source=rss-e8e2cb18259d------2</link>
            <guid isPermaLink="false">https://medium.com/p/7552f8888754</guid>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[beginners-guide]]></category>
            <category><![CDATA[flutter-app-development]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[flutter-widget]]></category>
            <dc:creator><![CDATA[Dev_with_Subham]]></dc:creator>
            <pubDate>Wed, 22 Apr 2026 17:31:20 GMT</pubDate>
            <atom:updated>2026-04-23T05:32:56.281Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://flutter.dev/">Flutter</a> makes building beautiful apps fast and easy — but only if you understand its core building blocks: <strong>widgets</strong>. <a href="https://flutterfever.com/flutter-tutorial-for-beginners/">Flutter tutorial</a> for beginner</p><p>In this article, we’ll walk through <strong>10 essential </strong><a href="https://flutterfever.com/flutter-tutorial-for-beginners/"><strong>Flutter widgets</strong></a> that every beginner should know, along with simple code examples.</p><h3>1. Text – Displaying simple strings</h3><p>The Text widget is the most basic way to show a string on the screen. You can style it with style: TextStyle(...).</p><pre>Text( &#39;Hello, Flutter!&#39;, <br>     style: TextStyle( <br>        fontSize: 24, <br>       fontWeight: FontWeight.bold,<br>        color: Colors.blue,<br>  ), <br>)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/492/1*B4q2qEjOE7szObgHkwnH-Q.png" /></figure><h3>2. Container – A box with padding, margin, background, and more</h3><p>Container is like a Swiss Army knife. It can hold a child, add padding/margin, apply a background colour, round its corners, or even add a shadow.</p><pre>Container(<br>  width: 150,<br>  height: 150,<br>  padding: EdgeInsets.all(16),<br>  margin: EdgeInsets.all(8),<br>  decoration: BoxDecoration(<br>    color: Colors.amber,<br>    borderRadius: BorderRadius.circular(12),<br>    boxShadow: [<br>      BoxShadow(blurRadius: 8, color: Colors.grey),<br>    ],<br>  ),<br>  child: Text(&#39;Inside Container&#39;),<br>)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/491/1*_xKRpgrvAb7djO0Mo9PYEw.png" /></figure><h3>3. Row &amp; Column – Arranging children horizontally / vertically</h3><p>Row places its children side‑by‑side. Column stacks them top‑to‑bottom. Use MainAxisAlignment and CrossAxisAlignment to control alignment.</p><pre>Row(<br>  mainAxisAlignment: MainAxisAlignment.spaceEvenly,<br>  children: [<br>    Icon(Icons.star, color: Colors.red),<br>    Icon(Icons.star, color: Colors.red),<br>    Icon(Icons.star, color: Colors.red),<br>  ],<br>)<br><br>Column(<br>  crossAxisAlignment: CrossAxisAlignment.start,<br>  children: [<br>    Text(&#39;First line&#39;),<br>    Text(&#39;Second line&#39;),<br>    Text(&#39;Third line&#39;),<br>  ],<br>)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/492/1*Mm5XbLFt_AAofHGEakOGbw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*mHhLzjTdVW63HpvgZURdNw.png" /></figure><h3>4. Image – Showing local or network images</h3><p>Display images from the internet, assets, or the device. The most common version uses NetworkImage.</p><pre>Image.network(<br>  &#39;https://picsum.photos/200/150&#39;,<br>  width: 200,<br>  height: 150,<br>  fit: BoxFit.cover,<br>)</pre><p>For local assets, use Image.asset(&#39;assets/my_image.png&#39;).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/493/1*v-eQAK5-fv8lCSygJjtWXw.png" /></figure><h3>5. Icon – Material Design icons</h3><p>Flutter bundles the entire Material Icons set. Just pick an icon and set its size/colour.</p><pre>Icon(<br>  Icons.favorite,<br>  size: 48,<br>  color: Colors.pink,<br>)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/494/1*Md7z0qS7bCvmP9JT_Wv21w.png" /></figure><h3>6. ElevatedButton – A modern, material‑style button</h3><p>ElevatedButton replaces the old RaisedButton. It’s a clickable button with elevation and a built‑in splash effect.</p><pre>ElevatedButton(<br>  onPressed: () {<br>    print(&#39;Button tapped!&#39;);<br>  },<br>  style: ElevatedButton.styleFrom(<br>    backgroundColor: Colors.green,<br>    foregroundColor: Colors.white,<br>  ),<br>  child: Text(&#39;Click Me&#39;),<br>)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/483/1*RqlfMABubOf3xdn_qVYyNg.png" /></figure><h3>7. Scaffold – The basic app layout structure</h3><p>Scaffold provides the default app bar, a body area, a floating action button, a drawer, and more. It’s the skeleton of most Material Design screens.</p><pre>Scaffold(<br>  appBar: AppBar(<br>    title: Text(&#39;My App&#39;),<br>  ),<br>  body: Center(<br>    child: Text(&#39;Hello, Scaffold!&#39;),<br>  ),<br>  floatingActionButton: FloatingActionButton(<br>    onPressed: () {},<br>    child: Icon(Icons.add),<br>  ),<br>)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/489/1*TQkhG-zDEs3z6Ia-Ku8D5Q.png" /></figure><h3>8. AppBar – The top bar of a screen</h3><p>Usually used inside a Scaffold. It can display a title, actions (icons/buttons), and a leading back arrow.</p><pre>AppBar(<br>  title: Text(&#39;Dashboard&#39;),<br>  centerTitle: true,<br>  backgroundColor: Colors.teal,<br>  actions: [<br>    IconButton(<br>      icon: Icon(Icons.search),<br>      onPressed: () {},<br>    ),<br>  ],<br>)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/490/1*3WJFzYlulnHPSwVnil1zrA.png" /></figure><h3>9. ListView – Scrollable list of children</h3><p><a href="https://flutterfever.com/flutter-tutorial-for-beginners/">ListView</a> lets you scroll through a collection of widgets. The simplest version is ListView() for a small number of items, or ListView.builder() for long/lazy lists.</p><pre>ListView.builder(<br>  itemCount: 20,<br>  itemBuilder: (context, index) {<br>    return ListTile(<br>      leading: Icon(Icons.person),<br>      title: Text(&#39;Item $index&#39;),<br>      subtitle: Text(&#39;Description for item $index&#39;),<br>    );<br>  },<br>)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/492/1*vhL1KrE0d7QUZTgbzjFfIQ.png" /></figure><h3>10. Stack – Overlapping widgets</h3><p><a href="https://flutterfever.com/flutter-tutorial-for-beginners/">Stack</a> positions its children on top of each other. You can control each child’s position with Positioned.</p><pre>Stack(<br>  children: [<br>    Container(width: 200, height: 200, color: Colors.grey),<br>    Positioned(<br>      top: 20,<br>      left: 20,<br>      child: Icon(Icons.location_on, size: 40, color: Colors.red),<br>    ),<br>    Positioned(<br>      bottom: 20,<br>      right: 20,<br>      child: Text(&#39;Overlay text&#39;),<br>    ),<br>  ],<br>)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*m1ImTeOJdbqMSB3OinCivw.png" /></figure><h3>Putting It All Together</h3><p>Here’s a minimal main.dart that combines several of these widgets inside a Scaffold:</p><pre>import &#39;package:flutter/material.dart&#39;;<br><br>void main() =&gt; runApp(MyApp());<br><br>class MyApp extends StatelessWidget {<br>  @override<br>  Widget build(BuildContext context) {<br>    return MaterialApp(<br>      home: Scaffold(<br>        appBar: AppBar(title: Text(&#39;Top 10 Widgets&#39;)),<br>        body: Center(<br>          child: Column(<br>            mainAxisAlignment: MainAxisAlignment.center,<br>            children: [<br>              Text(&#39;Welcome!&#39;, style: TextStyle(fontSize: 24)),<br>              SizedBox(height: 20),<br>              ElevatedButton(<br>                onPressed: () {},<br>                child: Text(&#39;Press me&#39;),<br>              ),<br>            ],<br>          ),<br>        ),<br>      ),<br>    );<br>  }<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/863/1*_nT6N1pf4h1JRMlfPwZzOA.png" /></figure><h3>Next Steps</h3><p>Mastering these 10 widgets will give you a solid foundation. From there, explore:</p><ul><li>GridView – for grid layouts</li><li>Card – for material‑style cards</li><li>TextField – for user input</li><li>FutureBuilder / StreamBuilder – for async data</li></ul><h3>Final Thoughts</h3><p>Flutter’s widget system is incredibly powerful — but also easy to learn when you start with the right pieces. Practice by mixing and matching the widgets above, and soon you’ll be building beautiful, responsive UIs.</p><p>If you found this helpful, please clap , share, and follow for more Flutter tutorials.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7552f8888754" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[For Absolute beginner, Getting Started with Flutter: Understanding Stateless and Stateful Widgets]]></title>
            <link>https://medium.com/@devwithsubham007/for-absolute-beginner-getting-started-with-flutter-understanding-stateless-and-stateful-widgets-067089da413a?source=rss-e8e2cb18259d------2</link>
            <guid isPermaLink="false">https://medium.com/p/067089da413a</guid>
            <category><![CDATA[flutter-widget]]></category>
            <category><![CDATA[flutter-app-development]]></category>
            <category><![CDATA[flutter-ui]]></category>
            <category><![CDATA[flutter-stateful-widget]]></category>
            <category><![CDATA[flutter-stateless-widget]]></category>
            <dc:creator><![CDATA[Dev_with_Subham]]></dc:creator>
            <pubDate>Tue, 21 Apr 2026 18:22:24 GMT</pubDate>
            <atom:updated>2026-04-21T18:22:24.004Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><ul><li>What is <a href="https://pub.dev/">Flutter</a>? (UI toolkit from Google)</li><li>Everything is a widget.</li><li>Why understanding stateless vs stateful matters.</li><li>Brief mention of state management.</li></ul><h3>What is Flutter?</h3><p><a href="https://pub.dev/">Flutter </a>is an open-source UI toolkit by Google that allows you to build natively compiled applications for mobile, web, and desktop — all from a single codebase using Dart.</p><p>Why developers love <a href="https://flutterfever.com/flutter-tutorial-for-beginners/">Flutter</a>:</p><ul><li>Fast development with hot reload</li><li>Beautiful, customizable UI</li><li>Strong community and support</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*1Sopqlv535mUa1W27di6bA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/527/1*xNpWqicEErC4l0xuGUwTQA.png" /></figure><h3>Everything is a Widget</h3><p>In <a href="https://flutter.dev/">Flutter</a>, every element on the screen — text, buttons, layout, padding — is a widget. Widgets describe how your app looks and behaves.</p><p>There are two main types:</p><ul><li>Stateless Widgets</li><li>Stateful Widgets</li></ul><p>Let’s understand both.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/522/1*OQWcX5J2rLYpImMxum8LVQ.png" /></figure><h3>Stateless Widgets</h3><p>A <strong>Stateless Widget</strong> is immutable, meaning its data cannot change once it’s created.</p><h3>Key Characteristics:</h3><ul><li>Static content</li><li>No internal state</li><li>Rebuilds only when parent updates</li></ul><h3>When to Use:</h3><p>Use stateless widgets when your UI does not depend on dynamic data.</p><h3>Example:</h3><pre>import &#39;package:flutter/material.dart&#39;;<br><br> class MyStatelessWidget extends StatelessWidget { <br>    <br>    @override  <br>    Widget build(BuildContext context) <br>   { <br>     return <br>          Text(&#39;Hello, Flutter!&#39;); <br>                                       }<br>    }</pre><h4>Here, the text will never change unless the widget is rebuilt externally.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/490/1*O8lzf-5mgq46JIQFzSXbgw.png" /></figure><h3>Stateful Widgets</h3><p>A <strong>Stateful Widget</strong> can change its state during runtime. This means the UI can update dynamically based on user interaction or data changes.</p><h3>Key Characteristics:</h3><ul><li>Mutable state</li><li>Can rebuild UI dynamically</li><li>Uses setState() to update</li></ul><h3>When to Use:</h3><p>Use stateful widgets when your UI needs to react to:</p><ul><li>User input</li><li><a href="https://flutterfever.com/mock-api-playground-for-flutter-developers/">API data</a></li><li><a href="https://flutterfever.com/flutter-advance-animation-implicit-and-explicit-animations/"><em>Animations</em></a></li></ul><h3>Example:</h3><pre>import &#39;package:flutter/material.dart&#39;; <br><br>class CounterWidget extends StatefulWidget { <br><br>@override<br>      _CounterWidgetState <br><br>         createState() =&gt; _CounterWidgetState(); }<br><br> class _CounterWidgetState extends State&lt;CounterWidget&gt;<br><br> { <br>      int count = 0; void increment() <br>                 { <br>                    setState(() { count++; });<br>                                                 } <br><br>@override <br><br>Widget build(BuildContext context) <br>{ <br>      return Column( children: [ <br><br>                   Text(&#39;Count: $count&#39;), <br>             <br>           ElevatedButton( onPressed: increment,  child: Text(&#39;Increase&#39;), <br>                ), <br>             ],<br>          ); <br>        } <br>      }</pre><p><strong>Each button press updates the UI because the state changes.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/519/1*emVRq_2YEN88ZOWRilyR2A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/523/1*n5txu539yYVelIY2rJaL_w.png" /></figure><pre><strong>Stateless vs Stateful: Quick Comparison :</strong><br><br><strong>Feature</strong>                   <strong>Stateless Widget </strong>               <strong>Stateful Widget<br></strong><br>Mutability                   Immutable                        Mutable<br><br>State Management                No                              Yes<br><br>Use Case                      Static UI                      Dynamic UI<br><br>Performance                  Lightweight                  Slightly heavier</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/495/1*KhPr6Ql9BINGv68hgBBvmA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/1*529hSsa_CGQWPWzluVYLgg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/517/1*qngDbgBLcZQAA_tmUIX7zQ.png" /></figure><h3>Best Practices</h3><ul><li>Prefer <strong>Stateless Widgets</strong> when possible (better performance &amp; simplicity)</li><li>Use <strong>Stateful Widgets</strong> only when needed</li><li>Keep widgets small and reusable</li><li>Separate UI and logic for cleaner code</li></ul><h3>Final Thoughts</h3><p>Understanding Stateless and Stateful widgets is the foundation of Flutter development. Once you grasp this concept, building dynamic apps becomes much easier.</p><p>Start small: try converting a stateless widget into a stateful one and observe the difference.</p><p>FeatureStateless WidgetStateful WidgetMutabilityImmutableMutableState ManagementNoYesUse CaseStatic UIDynamic UIPerformanceLightweightSlightly heavier</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=067089da413a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GitHub for Beginners: Connect GitHub with VS Code in 10 Easy Steps (2026 Updated)]]></title>
            <link>https://medium.com/@devwithsubham007/github-for-beginners-connect-github-with-vs-code-in-10-easy-steps-2026-updated-211b8db0bf80?source=rss-e8e2cb18259d------2</link>
            <guid isPermaLink="false">https://medium.com/p/211b8db0bf80</guid>
            <category><![CDATA[beginner]]></category>
            <category><![CDATA[flutter-app-development]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[vscode]]></category>
            <dc:creator><![CDATA[Dev_with_Subham]]></dc:creator>
            <pubDate>Sun, 19 Apr 2026 17:30:14 GMT</pubDate>
            <atom:updated>2026-04-19T17:41:43.167Z</atom:updated>
            <content:encoded><![CDATA[<p>Never used GitHub before? No worries! This beginner-friendly guide will take you from zero to pushing your first code in under 15 minutes.</p><h3>Introduction</h3><p>Hey there, fellow coder!</p><p>If you’re just starting your coding journey, you’ve probably heard the words <strong>Git</strong> and <strong>GitHub</strong> a thousand times. They sound scary, but trust me — they’re actually super simple once you see them in action.</p><p>In this blog, I’ll show you <strong>exactly</strong> how to:</p><ul><li>Create your first GitHub account</li><li>Set up Git on your computer</li><li>Connect GitHub with <strong>Visual Studio Code</strong> (VS Code)</li><li>Push, pull, and manage your code like a pro</li></ul><p>No previous experience needed. Let’s dive in!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WncHNyaBXWgRnNGQ5flTfQ.jpeg" /></figure><h3>What is GitHub? (Super Simple Explanation)</h3><ul><li><strong>Git</strong> = Version control system (keeps track of your code changes)</li><li><strong>GitHub</strong> = The website where you store your code online (like Google Drive for coders)</li></ul><p>Connecting both with <strong>VS Code</strong> is the most popular way developers work today.</p><h3>Prerequisites (Takes 5 minutes)</h3><p>Before we start, make sure you have these three things:</p><ol><li><strong>A computer</strong> (Windows, Mac, or Linux — all work)</li><li><a href="https://flutterfever.com/how-to-update-flutter-sdk-in-vs-code/"><strong>Visual Studio Code</strong></a> installed → <a href="https://code.visualstudio.com/">Download here</a></li><li><strong>Internet connection</strong></li></ol><p>That’s it!</p><h3>Step 1: Create a GitHub Account</h3><ol><li>Go to <a href="https://github.com/">github.com</a></li><li>Click on <strong>Sign up</strong></li><li>Enter your email, choose a username, and set a strong password</li><li>Verify your email</li></ol><p><strong>Pro Tip:</strong> Choose a professional username (e.g., subhamcodes instead of subham123</p><h3>Step 2: Install Git (If Not Already Installed)</h3><ol><li>Go to <a href="https://git-scm.com/downloads">git-scm.com</a></li><li>Download and install Git for your operating system</li><li>Keep clicking “Next” (default settings are fine)</li></ol><p>After installation, open <strong>Command Prompt</strong> (Windows) or <strong>Terminal</strong> (Mac/Linux) and type:</p><pre>git --version</pre><p>You should see something like git version 2.45.0</p><h3>Step 3: Configure Git with Your Details</h3><p>Open VS Code → Open Terminal (Ctrl + `` `) and run these two commands <strong>one time only</strong>:</p><pre>git config --global user.name &quot;Your Name&quot;<br>git config --global user.email &quot;your.email@example.com&quot;</pre><p>Replace with the same name and email you used on GitHub.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/784/1*5ChRQhXiIP6suHDXeLmT2w.jpeg" /></figure><h3>Step 4: Create Your First Repository on GitHub</h3><ol><li>Log in to GitHub</li><li>Click <strong>+</strong> (top right) → <strong>New repository</strong></li><li>Give it a name: my-first-repo</li><li>Description (optional): My first GitHub project</li><li>Keep it <strong>Public</strong> (for beginners)</li><li>Check “Add a README file”</li><li>Click <strong>Create repository</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/784/1*Q-PGJAzQdtEMA_y6vZl3lw.jpeg" /></figure><h3>Step 5: Connect VS Code with GitHub (The Magic Part)</h3><p>Now the best part — connecting VS Code directly to GitHub.</p><h4>Method A (Easiest — Recommended in 2026)</h4><ol><li>Open VS Code</li><li>Click on the <strong>Source Control</strong> icon (looks like a branch) on the left sidebar</li><li>Click <strong>Sign in with GitHub</strong></li><li>Allow GitHub to connect</li><li>Done!</li></ol><p>You will now see a “GitHub” option in the Source Control panel.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v8KWjgEz24A4DWzxVhvvWQ.jpeg" /></figure><h3>Step 6: Clone Your Repository into VS Code</h3><ol><li>Go back to your GitHub repo page</li><li>Click the green <strong>Code</strong> button</li><li>Copy the <strong>HTTPS</strong> URL</li><li>In VS Code, press Ctrl + Shift + P</li><li>Type <strong>Git: Clone</strong></li><li>Paste the URL and press Enter</li><li>Choose a folder on your computer to save the project</li><li>Click <strong>Open</strong></li></ol><p>Your repository is now connected!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/784/1*v50prVQ1H0BIeN5eT39V5g.jpeg" /></figure><h3>Step 7: Make Changes and Commit</h3><ol><li>Open the README.md file</li><li>Add some text like</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*87grrX6a5ylJaj1-CjsXVQ.jpeg" /></figure><pre>Hello World! This is my first GitHub project with VS Code</pre><p>3. Save the file (Ctrl + S)</p><p>4.Go to <strong>Source Control</strong> panel</p><p>5. Write a commit message: Updated README with first changes</p><p>6. Click <strong>Commit</strong></p><h3>Step 8: Push Your Changes to GitHub</h3><ol><li>In the same Source Control panel, click <strong>Sync Changes</strong> (or Push)</li><li>Go to your GitHub repo in the browser → Refresh the page</li></ol><p>You will see your changes live!</p><h3>Bonus Tips for Beginners</h3><ul><li><strong>Pull</strong> = Download latest changes from GitHub (Sync Changes button)</li><li><strong>Push</strong> = Upload your changes to GitHub</li><li>Always write clear commit messages</li><li>Create a new branch before making big changes (we’ll cover this in Part 2)</li><li>Use the <strong>GitHub Pull Requests and Issues</strong> extension in VS Code (highly recommended)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u-MFjKRHKMz7glzjVOqF0Q.jpeg" /></figure><h3>Conclusion</h3><p>Congratulations brother! You just completed your first full GitHub + VS Code workflow.</p><p>You are now officially part of the developer community.</p><p><strong>What to do next?</strong></p><ol><li>Star this blog .</li><li>Create 2–3 more repositories and practice.</li><li>Follow me on GitHub (I’ll add my link in comments).</li><li>For <a href="https://flutterfever.com/download-git-for-flutter-on-windows/"><em>more</em></a> .</li></ol><p>Drop your GitHub username in the comments — I’ll follow you back!</p><p>See you in <strong>Part 2</strong>: Branching, Pull Requests &amp; GitHub Pages (coming soon).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=211b8db0bf80" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Set Up Get CLI and Build Clean MVC Apps with GetX in Flutter (2026 Guide)]]></title>
            <link>https://medium.com/@devwithsubham007/how-to-set-up-get-cli-and-build-clean-mvc-apps-with-getx-in-flutter-2026-guide-73fb7d8242dc?source=rss-e8e2cb18259d------2</link>
            <guid isPermaLink="false">https://medium.com/p/73fb7d8242dc</guid>
            <category><![CDATA[flutter-tutorial]]></category>
            <category><![CDATA[get-cli]]></category>
            <category><![CDATA[getx]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[flutter-app-development]]></category>
            <dc:creator><![CDATA[Dev_with_Subham]]></dc:creator>
            <pubDate>Fri, 17 Apr 2026 17:07:52 GMT</pubDate>
            <atom:updated>2026-04-19T16:58:49.789Z</atom:updated>
            <content:encoded><![CDATA[<p>Stop writing boilerplate code manually. Get CLI helps you create modular, scalable Flutter apps with GetX in seconds. Here’s exactly how to do it.</p><p>If you’re a Flutter developer tired of manually creating controllers, views, bindings, and routes every time you add a new screen, this post is for you.</p><p><strong>GetX</strong> is still one of the most loved lightweight solutions for state management, routing, and dependency injection in Flutter. And <strong>Get CLI</strong> makes working with it ridiculously fast.</p><p>In this step-by-step guide, I’ll show you how to install Get CLI, set up a proper MVC-style project, and generate clean, production-ready files in seconds.</p><p>Whether you’re building your first app or scaling a large one, this workflow will save you hours every week.</p><h3>Why Use Get CLI with GetX?</h3><p>Manually organizing folders and writing repetitive code slows you down and leads to inconsistency.</p><p>Get CLI (official CLI tool for GetX) solves this by:</p><ul><li>Generating a clean, modular project structure</li><li>Creating View + Controller + Binding files automatically</li><li>Following the popular GetX Pattern (which maps beautifully to MVC)</li><li>Supporting model generation from JSON</li></ul><p>Result? You focus on business logic and beautiful UI instead of folder management.</p><h3>Step 1: Install Get CLI (One-Time Setup)</h3><p>Open your terminal and run:</p><pre>dart pub global activate get_cli</pre><p>Or if you prefer the Flutter way:</p><pre>flutter pub global activate get_cli</pre><p>After installation, verify it with:</p><pre>get -v</pre><p>Pro Tip: If the get command doesn’t work immediately, close and reopen your terminal (or add Dart’s global bin to your PATH).</p><h3>Step 2: Create a New GetX Project</h3><p>You have two smooth options:</p><p><strong>Option 1 (Recommended for new projects):</strong></p><pre>get create project</pre><p>Answer the prompts (project name, organization, etc.). It sets up everything with GetX already added.</p><p><strong>Option 2 (For existing projects):</strong></p><pre>get init</pre><p>When prompted, choose <strong>GetX Pattern (by Kauê)</strong> — this is the most popular choice for MVC-style development.</p><h3>Step 3: Understand the MVC-Friendly Folder Structure</h3><p>After initialization, your lib/app/ folder will look like this:</p><pre>lib/<br>└── app/<br>    ├── data/              # Models, services, repositories<br>    ├── modules/           # Feature-based modules (the heart of MVC)<br>    │   └── home/<br>    │       ├── home_binding.dart<br>    │       ├── home_controller.dart<br>    │       └── home_view.dart<br>    ├── routes/<br>    │   └── app_pages.dart     # All routes managed here<br>    └── components/        # Reusable widgets</pre><p>This structure keeps your code clean:</p><ul><li><strong>Model</strong> → Lives in data/models</li><li><strong>View</strong> → *_view.dart (UI layer)</li><li><strong>Controller</strong> → *_controller.dart (logic + reactive state)</li></ul><p>It scales beautifully for medium to large apps.</p><h3>Step 4: Generate MVC Files with Get CLI (The Magic Part)</h3><p>Here are the commands you’ll use daily:</p><h4>Create a Complete Page (View + Controller + Binding)</h4><pre>get create page:home</pre><p>This instantly creates a full module inside lib/app/modules/home/.</p><h4>Create a Page Inside an Existing Module</h4><pre>get create page:profile on home</pre><p>Generate Only a Controller or View</p><pre>get create controller:settings on home<br>get create view:settings_view on home</pre><p>Auto-Generate Model from JSON (Game Changer)</p><pre>get generate model on home with assets/jsons/user.json</pre><p>It creates a clean Dart model with fromJson and toJson methods.</p><p>Other useful commands:</p><ul><li>get remove page:home → Safely delete a page</li><li>get update → Update Get CLI itself</li></ul><h3>Step 5: How the Generated Code Looks</h3><p><strong>home_view.dart</strong> (View):</p><pre>class HomeView extends GetView&lt;HomeController&gt; {<br>  const HomeView({super.key});<br><br>  @override<br>  Widget build(BuildContext context) {<br>    return Scaffold(<br>      appBar: AppBar(title: const Text(&#39;Home&#39;)),<br>      body: Obx(() =&gt; Center(<br>        child: Text(&#39;Count: ${controller.count.value}&#39;),<br>      )),<br>      floatingActionButton: FloatingActionButton(<br>        onPressed: controller.increment,<br>        child: const Icon(Icons.add),<br>      ),<br>    );<br>  }<br>}</pre><p>home_controller.dart (Controller):</p><pre>class HomeController extends GetxController {<br>  final count = 0.obs;<br><br>  void increment() =&gt; count.value++;<br>}</pre><p>Routes are auto-registered. Just use Get.toNamed(Routes.HOME) anywhere.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XvLxKa_Mjxk5SsTM-sQBQA.jpeg" /></figure><h3>Best Practices for Scalable GetX + MVC Apps</h3><ul><li>Organize by <strong>features/modules</strong> (auth, dashboard, products, etc.)</li><li>Keep shared models and services in the data/ folder</li><li>Always use Get.lazyPut() in bindings for better performance</li><li>Prefer GetView and GetxController for clean separation</li><li>Combine with Clean Architecture if your app grows very large</li></ul><h3>Final Thoughts</h3><p>Get CLI transforms how you build Flutter apps with GetX. What used to take 10–15 minutes of boring setup now takes 10 seconds.</p><p>Start small: Create a new project today, add a few screens, and generate a model from JSON. You’ll immediately feel the productivity boost.</p><p>Have you tried Get CLI yet? Which command do you use the most, or what challenges do you face with GetX project structure?</p><p>Drop your thoughts in the comments — I read and reply to every one.</p><p>If you found this helpful, clap and follow for more practical Flutter guides in 2026.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=73fb7d8242dc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Set Up Flutter on Windows/Mac and Create Your First Counter App (Beginner Friendly — 2026…]]></title>
            <link>https://medium.com/@devwithsubham007/how-to-set-up-flutter-on-windows-mac-and-create-your-first-counter-app-beginner-friendly-2026-10a3b5d245f2?source=rss-e8e2cb18259d------2</link>
            <guid isPermaLink="false">https://medium.com/p/10a3b5d245f2</guid>
            <category><![CDATA[step-by-step-flutter-set]]></category>
            <category><![CDATA[flutter-setup-with-vs]]></category>
            <category><![CDATA[flutter-app-development]]></category>
            <category><![CDATA[setup-flutter-in-mac]]></category>
            <category><![CDATA[setup-flutter]]></category>
            <dc:creator><![CDATA[Dev_with_Subham]]></dc:creator>
            <pubDate>Thu, 16 Apr 2026 18:31:36 GMT</pubDate>
            <atom:updated>2026-04-16T18:31:36.711Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to Set Up Flutter on Windows/Mac and Create Your First Counter App (Beginner Friendly — 2026 Edition)</h3><p>From zero to running your first Flutter app in under 30 minutes. I went through the same struggle — here’s exactly how I did it smoothly.</p><h3>Hey there, fellow developer!</h3><p>If you’re reading this, chances are you’ve heard about <strong>Flutter</strong> — Google’s superpower for building beautiful apps that run on Android, iOS, web, and even desktop from just <strong>one codebase</strong>.</p><p>I’m <a href="https://medium.com/@devwithsubham007">Dev_Subham</a> from Delhi, and when I started with Flutter, the setup felt a bit overwhelming. But once I got past the installation, everything clicked. The famous <strong>Hot Reload</strong> made me fall in love with it instantly.</p><p>In this post, I’ll walk you through the complete setup on <strong>Windows</strong> and <strong>macOS</strong>, and then we’ll build the classic <strong>Counter App</strong> together — step by step.</p><p>No fancy prior experience needed. Just follow along, and by the end, you’ll have a working app running on your phone or emulator.</p><p>Let’s dive in!</p><h3>Why Flutter in 2026?</h3><p>Flutter has become even more mature. With faster rendering (thanks to Impeller), better performance, and a huge community, it’s one of the best choices for building modern mobile apps.</p><p>Plus, the development experience is addictive — change your code and see the result instantly. No long rebuild waits!</p><h3>Prerequisites (Keep It Simple)</h3><ul><li>A decent laptop (Windows 10/11 or macOS)</li><li>At least 8–16 GB RAM</li><li>Stable internet (setup will download a few things)</li><li>Some patience for the first time</li></ul><p><strong>Recommended Tools:</strong></p><ul><li><strong>Visual Studio Code</strong> (lightweight + great Flutter support)</li><li>Or Android Studio (if you prefer a full IDE)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Iivx2GCCRkZ5VVH6Hm_Shg.jpeg" /></figure><h3>Step 1: Download and Install Flutter SDK</h3><ol><li>Head over to the official site: <a href="https://docs.flutter.dev/install"><strong>flutter.dev/install</strong></a> (always the best and latest source).</li></ol><p>2. Choose your OS (Windows or macOS) and download the <strong>Stable</strong> channel SDK.</p><ul><li>As of April 2026, Flutter 3.41+ is the stable version.</li></ul><h4>For Windows Users:</h4><ul><li>Extract the zip to a simple path like C:\src\flutter (avoid folders with spaces).</li><li>Add it to your system PATH:</li><li>Search “Environment Variables” → Edit Path → Add C:\src\flutter\bin.</li><li>Restart your Command Prompt or PowerShell.</li></ul><h4>For macOS Users:</h4><ul><li>Extract to ~/development/flutter</li><li>Open Terminal and run these commands:</li></ul><pre>cd ~/development/flutter<br>export PATH=&quot;$PATH:`pwd`/bin&quot;</pre><p>To make it permanent, add this line to your ~/.zshrc file:</p><pre>echo &#39;export PATH=&quot;$PATH:$HOME/development/flutter/bin&quot;&#39; &gt;&gt; ~/.zshrc<br>source ~/.zshrc</pre><h3>Step 2: Install Platform Dependencies</h3><h4>Android Setup (for both Windows &amp; Mac):</h4><ul><li>Download and install <strong>Android Studio</strong>.</li><li>Open it once → Go to SDK Manager and install:</li><li>Android SDK Platform-Tools</li><li>A recent Android SDK (Android 15 or 16)</li><li>Create an <strong>Android Virtual Device</strong> (emulator) from the Device Manager.</li></ul><h4>macOS Extra (for iOS development):</h4><ul><li>Install <strong>Xcode</strong> from the Mac App Store .</li><li>After installing, open Xcode and accept the license agreements.</li><li>(Optional) Install CocoaPods: sudo gem install cocoapods.</li></ul><h3>Step 3: The Magic Command — flutter doctor</h3><p>This is your best friend.</p><p>Open your terminal (Command Prompt on Windows, Terminal on Mac) and type:</p><pre>flutter doctor</pre><p>It will scan everything and tell you what’s missing or broken.</p><p><strong>Common fixes I faced:</strong></p><ul><li>Android licenses not accepted? → Run flutter doctor — android-licenses and press y for all.</li><li>Xcode issues on Mac? → Reopen Xcode and install any missing components.</li><li>“Flutter command not found”? → Double-check your PATH.</li></ul><p>Keep running flutter doctor until most checks show (green). It’s normal to have a cross mark for iOS on Windows or vice versa.</p><h3>Step 4: Create Your First Flutter Project</h3><p>Once flutter doctor looks good, run these commands:</p><pre>flutter create my_first_counter<br>cd my_first_counter</pre><p>This creates a complete starter project with the famous Counter App already built in!</p><p>Open the folder in VS Code:</p><pre>code .</pre><h3>Step 5: Let’s Understand the Counter App</h3><p>Open the file lib/main.dart</p><p>You’ll see clean Dart code. Here’s the heart of it (simplified for explanation):</p><p>The app has:</p><ul><li>A <strong>MaterialApp</strong> as the root</li><li>A <strong>Scaffold</strong> that gives you AppBar, body, and floating button</li><li>A <strong>StatefulWidget</strong> because the counter number changes</li></ul><p>When you press the <strong>+</strong> button, setState() updates the screen instantly.</p><p><strong>Key Flutter Concept (Super Important):</strong> Everything in Flutter is a <strong>Widget</strong>. Buttons, text, layouts — all are widgets combined like Lego blocks.</p><h3>Step 6: Run Your First App!</h3><ol><li>Start your Android Emulator (or connect your real Android phone with USB debugging enabled).</li><li>In the terminal (or VS Code), run:</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=10a3b5d245f2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>