<?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: Iqra Fatima</title>
    <description>The latest articles on DEV Community by Iqra Fatima (@iqrafatimame).</description>
    <link>https://dev.to/iqrafatimame</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%2F370243%2Fb0afb9ca-f9f0-46f7-9711-acf9a1c13c0d.jpeg</url>
      <title>DEV Community: Iqra Fatima</title>
      <link>https://dev.to/iqrafatimame</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/iqrafatimame"/>
    <language>en</language>
    <item>
      <title>Flutter: Difference Between Stateful and Stateless Widget</title>
      <dc:creator>Iqra Fatima</dc:creator>
      <pubDate>Wed, 29 Apr 2020 09:23:29 +0000</pubDate>
      <link>https://dev.to/iqrafatimame/flutter-difference-between-stateful-and-stateless-widget-54le</link>
      <guid>https://dev.to/iqrafatimame/flutter-difference-between-stateful-and-stateless-widget-54le</guid>
      <description>&lt;p&gt;📲 As we know that all the User Interface(UI) components in Flutter are known as widgets. The widgets can be just of two types.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1️⃣ Stateful Widgets &lt;/li&gt;
&lt;li&gt;2️⃣ Stateless Widget&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's discuss how they differ:&lt;/p&gt;

&lt;h1&gt;
  
  
  ⚡ &lt;strong&gt;Stateless Widget&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;A stateless widget can not change their state during the runtime of an app which means it can not redraw its self while the app is running. Stateless widgets are immutable.&lt;/p&gt;

&lt;h2&gt;
  
  
  🤔 How to create a Stateless Widget ?!
&lt;/h2&gt;

&lt;p&gt;🤔 How to create a Stateless Widget ?!&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--s4c3CxjE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/vispo79w7q3tiwzml3ud.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--s4c3CxjE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/vispo79w7q3tiwzml3ud.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's understand this code snippet.&lt;br&gt;
The name of the stateless widget is &lt;strong&gt;HomeScreen&lt;/strong&gt;, inside which we have to override the build method. The build method takes the &lt;strong&gt;BuildContext&lt;/strong&gt; as parameters and returns a widget. Below there is the place where you can design the UI of the &lt;strong&gt;HomeScreen&lt;/strong&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The build(…) function of the StateLessWidget is called only ONCE. To redraw the StatelessWidget, we need to create a new instance of the Widget.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  😕 Where to use?!
&lt;/h2&gt;

&lt;p&gt;A stateless widget is used where you are not required to redraw a widget again &amp;amp; again, such as AppBar, scaffold, &amp;amp; icons, etc.&lt;/p&gt;

&lt;h1&gt;
  
  
  ⚡ &lt;strong&gt;Stateful Widget&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;A stateful widget can redraw itself multiple times, while the app is running which means its state is mutable. For example, when a button is pressed, the state of the widget is changed.&lt;/p&gt;

&lt;h2&gt;
  
  
  🤔How to Create a Stateful Widget?!
&lt;/h2&gt;

&lt;p&gt;Look at the structure of the stateful widget:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YBZPybuS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/33xhzdgu9tainuea8yw6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YBZPybuS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/33xhzdgu9tainuea8yw6.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Let's understand this code snippet.&lt;br&gt;
Here we have a class of &lt;strong&gt;HomeScreen&lt;/strong&gt; which extends from a &lt;strong&gt;Statefulwidge&lt;/strong&gt;t &amp;amp; it has to return the instance of the class &lt;strong&gt;_HomeScreen&lt;/strong&gt; in the &lt;strong&gt;createState()&lt;/strong&gt; method. The class &lt;strong&gt;_HomeScreenState&lt;/strong&gt; extends from &lt;strong&gt;State&amp;lt;&amp;gt;&lt;/strong&gt; which takes &lt;strong&gt;HomeScreen&lt;/strong&gt; as a template input.&lt;/p&gt;

&lt;p&gt;Now, this &lt;strong&gt;_HomeScreenState&lt;/strong&gt; overrides the build method and returns a widget. Below there you can add the UI of the app, which is stateful and can be called multiple times using &lt;strong&gt;setState&lt;/strong&gt; method.&lt;/p&gt;

&lt;h2&gt;
  
  
  😕 Where to use?!
&lt;/h2&gt;

&lt;p&gt;Let's say you have a timer on the top of your app &amp;amp; the state of it is changing every second. If your entire app is in a stateful widget then its rebuilding the entire app every second which is pretty expensive. If you just extend the TimeText to a stateful TimerText then an only tiny piece of app is updating every second now.&lt;/p&gt;

&lt;p&gt;👋 That’s all folks, thanks! if you like this post, don’t forget to leave a comment! 🤩&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>widget</category>
    </item>
    <item>
      <title>Why you should learn Flutter in 2020?</title>
      <dc:creator>Iqra Fatima</dc:creator>
      <pubDate>Mon, 20 Apr 2020 17:55:53 +0000</pubDate>
      <link>https://dev.to/iqrafatimame/why-you-should-learn-flutter-in-2020-5d2c</link>
      <guid>https://dev.to/iqrafatimame/why-you-should-learn-flutter-in-2020-5d2c</guid>
      <description>&lt;h1&gt;
  
  
  🤔 What is Flutter!?
&lt;/h1&gt;

&lt;p&gt;Just in case you have not heard about Flutter, it is an open-source User Interface (UI) framework created by Google back in May 2017. It allows you to build cross-platform mobile applications using Dart. Thus, allowing you to write the same codebase throughout the development. ⚡️&lt;/p&gt;

&lt;p&gt;😁 If by now you are convinced to dabble with Flutter then you should definitely know two of its most important parts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;📦 A Software Development Kit (SDK)

&lt;ul&gt;
&lt;li&gt;An SDK is a collection of software development tools in one installable package&lt;/li&gt;
&lt;li&gt;They make your app development process easier by providing you with a compiler, debugger &amp;amp; perhaps a software framework.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;📖 A Widget Library

&lt;ul&gt;
&lt;li&gt;A collection of reusable UI components such as buttons, text inputs, image, slider, columns &amp;amp; so on.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Flutter makes use of the programming language Dart which is super easy to learn if you are already familiar with languages such as Java, JavaScript (JS) and C#. 🙌🏻&lt;/p&gt;

&lt;h1&gt;
  
  
  👨🏻‍💻 How Flutter Started Trending?!
&lt;/h1&gt;

&lt;p&gt;Flutter has been around for quite a long time but it started getting popularity right after &lt;a href="https://developers.google.com/events/flutter-live/"&gt;Flutter Live&lt;/a&gt; on December 4, 2018. It was then when Google announced the first stable release of flutter with loads of new features including support for macOS alpha, add to the app, IOS 13 dark mod, Dart 2.7 and many more.&lt;/p&gt;

&lt;h1&gt;
  
  
  🎩 Why Adopt Flutter in 2020 for Development?!
&lt;/h1&gt;

&lt;p&gt;There are several reasons why you should learn &amp;amp; work with Flutter in 2020. There is a growing list of tech giants that are using Flutter in their development including Google, Alibaba, eBay and so on. 🚀&lt;/p&gt;

&lt;h2&gt;
  
  
  ⚙️ Easy to Learn and Use
&lt;/h2&gt;

&lt;p&gt;It is easier to build a rich and intuitive UI in Flutter since it is a UI development kit that integrates prepackaged widgets for Material Design and Cupertino instead of Android XML. It also has a growing community which always helps you out with you as much as they can. The following are some of the amazing resources I have found &amp;amp; used a lot of time over my run in Flutter.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;👌🏻 &lt;a href="https://flutterawesome.com/"&gt;Flutter Awesome&lt;/a&gt;: Best Flutter libraries &amp;amp; tools all in one place.&lt;/li&gt;
&lt;li&gt;🙌🏻 &lt;a href="https://github.com/Solido/awesome-flutter"&gt;Awesome Flutter&lt;/a&gt;: A GitHub repository with a list of articles, videos and so on to help you learn flutter.&lt;/li&gt;
&lt;li&gt;⚡️ &lt;a href="https://itsallwidgets.com/"&gt;It’s All Widgets&lt;/a&gt;: An open list of apps built with flutter.&lt;/li&gt;
&lt;li&gt;✍🏻 &lt;a href="https://medium.com/flutter-community"&gt;Flutter Community&lt;/a&gt;: A Medium publication where you can find articles, tutorials, and a lot more amazing stuff about Flutter.&lt;/li&gt;
&lt;li&gt;📝 &lt;a href="https://www.appbrewery.co/p/flutter-development-bootcamp-with-dart1/?fbclid=IwAR14_a3YckE-Qmn25ucUcPQJvzSpvyPJajiHc7Im1wlzbQooudFnDMYgwjo"&gt;The App Brewery&lt;/a&gt;: Free course Flutter course curated &amp;amp; created by the Google Flutter Team &amp;amp; App brewery.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🚀 Developers Productivity
&lt;/h2&gt;

&lt;p&gt;Every time developers make changes to the app, they have to rebuild the app or third-party dependencies in some cases to see the changes in the emulator or on devices. As a native Android developer, you might have experienced this slow process as Gradle builds can take a lot of time. 😬&lt;/p&gt;

&lt;p&gt;🔥 Flutter provides this awesome Hot Reload feature that allows you to see the reflected change after bug fixes, building UI and even adding certain features to the app without running your application over and over again. Isn’t it just amazing?!&lt;/p&gt;

&lt;h2&gt;
  
  
  🙌🏻 Awesome Documentation
&lt;/h2&gt;

&lt;p&gt;Good documentation is very important for any product whatsoever. With that being said, Flutter provides this amazing &lt;a href="https://flutter.dev/docs"&gt;documentation&lt;/a&gt; that teaches you a lot about this framework. Everything there is very detailed &amp;amp; meticulously curated with some awesome examples. It’s always been my first go resource when I get stuck somewhere.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--eKYqTjf_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/3w1yk2ki46udgsjc52o7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--eKYqTjf_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/3w1yk2ki46udgsjc52o7.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  😵 How to Start?!
&lt;/h1&gt;

&lt;p&gt;If you liked Flutter and want to try it on your own, the best idea is to start &lt;a href="https://codelabs.developers.google.com/codelabs/flutter/#0"&gt;Google Codelabs&lt;/a&gt;. After these Codelabs, you’ll make a simple and beautiful &lt;strong&gt;Chat message application&lt;/strong&gt;.&lt;br&gt;
 .  .  .&lt;/p&gt;

&lt;p&gt;👋 That's all folks, thanks! if you like this post, don't forget to leave a comment! 🤩&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>dev</category>
      <category>dart</category>
    </item>
  </channel>
</rss>
