<?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 Subhan Abbasi on Medium]]></title>
        <description><![CDATA[Stories by Subhan Abbasi on Medium]]></description>
        <link>https://medium.com/@Subhan_Abbasi?source=rss-aeb18694b0e7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*bDH-UYuyD8Hi8Uoo</url>
            <title>Stories by Subhan Abbasi on Medium</title>
            <link>https://medium.com/@Subhan_Abbasi?source=rss-aeb18694b0e7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 02:57:50 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@Subhan_Abbasi/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[IUBMUN 2026: Bahawalpur’s First University-Level Model United Nations Conference]]></title>
            <link>https://medium.com/@Subhan_Abbasi/iubmun-2026-bahawalpurs-first-university-level-model-united-nations-conference-5fc3968c09bc?source=rss-aeb18694b0e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/5fc3968c09bc</guid>
            <category><![CDATA[mun]]></category>
            <category><![CDATA[education]]></category>
            <category><![CDATA[bahawalpur]]></category>
            <category><![CDATA[model-united-nations]]></category>
            <category><![CDATA[pakistan]]></category>
            <dc:creator><![CDATA[Subhan Abbasi]]></dc:creator>
            <pubDate>Thu, 03 Dec 2026 11:14:51 GMT</pubDate>
            <atom:updated>2026-12-03T11:14:51.846Z</atom:updated>
            <content:encoded><![CDATA[<p>The Islamia University of Bahawalpur is bringing Model UN to the city, with five committees open to students from every discipline.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*kUO1gpraub3Qbw8ncrd1hA.jpeg" /></figure><p>For the first time, a university-level Model United Nations conference is coming to Bahawalpur. <a href="https://iubmun.iub.edu.pk/">The Islamia University of Bahawalpur (IUB) is organising IUBMUN 2026</a>, also written IUBMUN’26, a student-led MUN conference where students will debate global issues, negotiate solutions and practise diplomacy.</p><p>If you have heard of MUN but never tried it, or if you are a regular at conferences in other cities, this one is happening on your doorstep.</p><h3>What is a Model United Nations?</h3><p>A Model United Nations, or MUN, is an educational simulation of the United Nations. Each student becomes a delegate who represents a country, or a stakeholder, inside a committee. Delegates research a topic, give speeches, negotiate with other delegates and work together on resolutions, just like diplomats do. You can read about the real United Nations on the <a href="https://www.un.org/">United Nations website</a>.</p><p>No prior diplomatic knowledge is needed to enjoy the idea. What matters is curiosity, research and the willingness to speak.</p><h3>Why a MUN in Bahawalpur matters</h3><p>A conference like this gives students in the city a local place to build skills that employers and universities look for: public speaking, negotiation, critical thinking and teamwork. Students do not need to travel to another city to experience it.</p><p>IUBMUN also aims to bring together students from across Punjab and Pakistan. The organisers describe the goal as a space where students from different backgrounds exchange ideas, learn about international relations and become confident, ethical leaders.</p><h3>The five committees at IUBMUN 2026</h3><p>IUBMUN’26 will have five committees, each with a different focus:</p><ul><li><strong>Provincial / National Assembly (PNA):</strong> national policies, legislation and governance in Pakistan.</li><li><strong>United Nations Human Rights Council (UNHRC):</strong> global human rights challenges, accountability and the protection of fundamental freedoms.</li><li><strong>UN Commission on the Status of Women (UN Women / UNCSW):</strong> gender equality, empowerment and socio-economic frameworks.</li><li><strong>Crisis Committee:</strong> fast-moving scenarios that call for quick thinking, strategy and real-time response.</li><li><strong>United Nations Security Council (UNSC):</strong> global peace, sovereignty, conflict resolution and international security.</li></ul><p>Whether your interest is law, politics, rights, security or simply debate, there is a committee to match it.</p><h3>Who can take part?</h3><p>IUBMUN is open to students from all academic disciplines. You do not need to study international relations. Students can join as an <strong>individual delegate</strong>, representing a country, or as part of a <strong>delegation of four students</strong> taking part across the five committees as a team. Delegates receive their country allocations and committee background guides after registration is confirmed.</p><p>The <a href="https://iubmun.iub.edu.pk/">IUBMUN website</a> will announce delegate registration details, eligibility and fees.</p><h3>Join the team behind the conference</h3><p>The organising team is also recruiting for the Executive Council and Directorates. Directorate positions are open only to students of The Islamia University of Bahawalpur, while Executive Council positions are open to eligible applicants from inside and outside the university. Relevant experience, such as MUN participation or leadership roles, is required. Students interested in committee leadership positions can contact the team and share their CV.</p><h3>Conference details</h3><ul><li><strong>Dates:</strong> 16 dec-18 dec</li><li><strong>Venue:</strong> will be comfirm soon.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iFb3jDmtul_8bpBFGCH9dw.jpeg" /></figure><h3>How to stay updated</h3><p>Follow <a href="https://instagram.com/iubmunofficial">@iubmunofficial on Instagram</a> and visit the official website for announcements on recruitment, delegate registration and the conference schedule.</p><p>IUBMUN 2026 is a chance for Bahawalpur’s students to take a seat at the table and see how diplomacy works. If you have ever wanted to try MUN, this is the first chance to do it at a university conference in the city.</p><p><em>Subhan Abbasi is a member of the IUBMUN organising team at The Islamia University of Bahawalpur. [Marketing Deputy Director]</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5fc3968c09bc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From MVP to Market-Ready Product: Why Some Developers Earn 10x More]]></title>
            <link>https://medium.com/@Subhan_Abbasi/from-mvp-to-market-ready-product-why-some-developers-earn-10x-more-faac054ece77?source=rss-aeb18694b0e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/faac054ece77</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[flutter-app-development]]></category>
            <category><![CDATA[entrepreneurship]]></category>
            <dc:creator><![CDATA[Subhan Abbasi]]></dc:creator>
            <pubDate>Fri, 17 Apr 2026 20:36:42 GMT</pubDate>
            <atom:updated>2026-04-17T20:36:42.973Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>A startup once hired two developers for the same app idea. Both delivered apps that looked identical on the surface.</blockquote><blockquote>One was fast and cheap. The other took more time and cost nearly 10x more.At launch, both worked fine.</blockquote><blockquote>But within weeks, the difference became obvious. The cheaper app started breaking under real users. Updates became painful. Performance dropped. Every small change introduced new bugs.</blockquote><blockquote>The other app kept evolving smoothly — handling growth, new features, and real traffic without collapsing.</blockquote><blockquote>Same idea. Same features. Completely different outcomes. This is where most developers get it wrong.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UAF73A0yAtGV5W-CrVH0EA.png" /></figure><h3>💡 You’re Not Paid for Code</h3><p>Most developers think they are paid for writing code.</p><p>They’re not.</p><p>They are paid for solving problems — not just for today, but for months and years ahead.</p><p>That’s where the real gap comes in:</p><ul><li>MVP vs Market-Ready Product</li><li>$200 vs $2000 developers</li><li>Code vs Engineering thinking</li></ul><h3>🚀 MVP vs Market-Ready Product</h3><h3>🧪 MVP (Minimum Viable Product)</h3><p>An MVP is built to validate an idea as quickly as possible.</p><h4>It focuses on:</h4><ul><li>Core features only</li><li>Fast delivery</li><li>Minimum cost</li></ul><h4>Example (Food App):</h4><ul><li>Login</li><li>Restaurant list</li><li>Place order</li></ul><p>Nothing more.</p><blockquote>The goal is simple:<br>👉 <em>“Does this idea work?”</em></blockquote><h3>🏆 Market-Ready Product</h3><p>A market-ready product is built for real users, real traffic, and real growth.</p><h4>It includes:</h4><ul><li>Performance optimization</li><li>Stability under load</li><li>Clean user experience</li><li>Scalability</li><li>Maintainability</li></ul><h4>Same food app now becomes:</h4><ul><li>Live tracking</li><li>Notifications</li><li>Offers system</li><li>Error handling</li><li>Offline support</li><li>Analytics</li></ul><blockquote>The goal becomes:<br>👉 <em>“Can this product survive and scale in the real world?”</em></blockquote><h3>💰 Why One Developer Gets $200 and Another Gets $2000</h3><p>At first glance, both deliver “the same app.”</p><p>But under the hood, they are completely different systems.</p><h3>💸 MVP Developer ($200 mindset)</h3><ul><li>Focuses only on UI</li><li>Mixes logic in screens</li><li>No architecture</li><li>No long-term thinking</li></ul><p>👉 Result: Works now, breaks later</p><h3>💎 Product Developer ($2000 mindset)</h3><ul><li>Thinks in systems</li><li>Plans for scaling</li><li>Writes maintainable code</li><li>Optimizes performance</li></ul><p>👉 Result: Works now, grows later</p><h3>⚠️ The Hidden Cost Clients Don’t See</h3><p>Clients don’t pay more for “extra code.”</p><h4>They pay to avoid:</h4><ul><li>Rewrites</li><li>Performance issues</li><li>Scaling failures</li><li>Long-term maintenance chaos</li></ul><p>A cheap app often becomes expensive later.</p><p>A well-structured product saves money over time.</p><h3>⚡ Performance, Maintainability &amp; Scalability</h3><h3>⚡ Performance</h3><p>How fast and smooth your app feels.</p><p>Bad performance leads to:</p><ul><li>Lag</li><li>Slow UI</li><li>Poor user retention</li></ul><h3>🧱 Maintainability</h3><p>How easily your code can be understood and updated later.</p><p>This is where structure matters.</p><p>If your code is:</p><ul><li>Modular</li><li>Clean</li><li>Separated by responsibility</li></ul><p>Then changes become fast and safe.</p><p>👉 In my experience, I follow <strong>MVVM + Clean Architecture + Modular Structure in Flutter</strong>, which keeps projects scalable and production-ready.<br>Read more here:<br><a href="https://medium.com/@Subhan_Abbasi/mvvm-clean-architecture-and-modular-structure-in-flutter-what-you-need-to-know-8f24d7e47d67">https://medium.com/@Subhan_Abbasi/mvvm-clean-architecture-and-modular-structure-in-flutter-what-you-need-to-know-8f24d7e47d67</a></p><h3>📈 Scalability</h3><p>How well your app handles growth:</p><ul><li>More users</li><li>More features</li><li>More data</li></ul><p>A scalable system doesn’t break when complexity increases — it adapts.</p><h3>🔧 How to Improve All Three</h3><p>If you want to move from developer to product engineer:</p><ul><li>Follow clean architecture (don’t mix UI and logic)</li><li>Think in systems, not screens</li><li>Optimize rebuilds and rendering</li><li>Use proper state management</li><li>Build reusable components</li><li>Design for growth from day one</li></ul><h3>🧠 Final Thought</h3><p>Anyone can build an app.</p><p>Very few can build a product.</p><p>The difference is not Flutter, Dart, or UI.</p><p>It’s thinking.</p><ul><li>MVP mindset: <em>“Make it work”</em></li><li>Product mindset: <em>“Make it last”</em></li></ul><p>And that shift is exactly what separates $200 projects from $2000+ products.</p><h3>💬 Feedback &amp; Collaboration</h3><p>If this article sparked a thought, helped you in any way, or left you with questions — I’d love to hear from you!</p><p>📫 <strong>Reach out or connect with me:</strong></p><ul><li>🔗 <strong>GitHub</strong>: <a href="https://github.com/SJA0010">github.com/SJA0010</a></li><li>💼 <strong>LinkedIn</strong>: <a href="http://www.linkedin.com/in/subhan-abbas">www.linkedin.com/in/subhan-abbas</a>i</li><li>📧 <strong>Email</strong>: <a href="/service/mailto:MSJA010@gmail.com">MSJA010@gmail.com</a></li><li>💬 <strong>WhatsApp</strong>: <a href="https://wa.me/923317364550">+923317364550</a></li></ul><p>⭐️ If you found value in this article, give it a clap, share it with your dev circle, or drop a star on the GitHub repo (if applicable). Your support helps me create more helpful content like this.</p><p><strong>Enquiries here</strong> : <a href="https://github.com/SJA0010">Github </a>, <a href="https://www.linkedin.com/in/subhan-abbasi-03b01b252">LinkedIn</a>, <a href="/service/mailto:MSJA010@gmail.com">Gmail</a>, <a href="https://wa.me/923317364550">whatsapp</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=faac054ece77" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Device Preview in Flutter: A Simple Way to Test Responsive UI]]></title>
            <link>https://medium.com/@Subhan_Abbasi/device-preview-in-flutter-a-simple-way-to-test-responsive-ui-2ad56eb1e870?source=rss-aeb18694b0e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/2ad56eb1e870</guid>
            <category><![CDATA[responsive-design]]></category>
            <category><![CDATA[ui]]></category>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Subhan Abbasi]]></dc:creator>
            <pubDate>Wed, 11 Mar 2026 22:48:00 GMT</pubDate>
            <atom:updated>2026-03-11T22:48:00.305Z</atom:updated>
            <content:encoded><![CDATA[<h3>What is Responsiveness in Flutter?</h3><p>In Flutter, <strong>responsiveness</strong> means designing user interfaces that automatically adapt to different screen sizes and orientations. Instead of using fixed sizes, developers typically rely on flexible layouts and tools such as MediaQuery, Expanded, and Flexible to ensure UI elements adjust dynamically.</p><p>However, testing responsiveness across multiple devices can be difficult if you only rely on physical devices or different emulators. This process can slow down development and make it harder to identify layout issues early.</p><h3>What is the Device Preview Package?</h3><p><strong>Device Preview</strong> is a Flutter package that allows developers to preview their application on multiple devices directly during development.</p><p>Instead of switching between different emulators or installing the app on many phones, Device Preview provides a visual simulation of different devices within the same interface. Developers can see how their app will appear on various smartphones and tablets while the app is running.</p><h3>Why Do Developers Use Device Preview?</h3><p>Device Preview makes it easier to test UI responsiveness without repeatedly changing emulator configurations. It allows developers to quickly simulate different screen sizes and see how the layout behaves.</p><p>Another useful capability is testing <strong>orientation changes</strong>, where the UI can be instantly viewed in both portrait and landscape modes. The package also helps test <strong>localization</strong>, allowing developers to preview how the app appears in different languages.</p><p>By identifying layout issues earlier in development, developers can ensure a smoother and more consistent user experience across devices.</p><h3>How to Implement Device Preview</h3><p>Implementing Device Preview in Flutter is simple. First, add the package to your pubspec.yaml.</p><pre>dependencies:<br>  device_preview: ^1.1.0</pre><p>Then wrap your application with DevicePreview in the main function.</p><pre>import &#39;package:flutter/material.dart&#39;;<br>import &#39;package:device_preview/device_preview.dart&#39;;<br><br>void main() {<br>  runApp(<br>    DevicePreview(<br>      enabled: true,<br>      builder: (context) =&gt; const MyApp(),<br>    ),<br>  );<br>}</pre><p>Next, configure your MaterialApp to support Device Preview.</p><pre>class MyApp extends StatelessWidget {<br>  const MyApp({super.key});<br><br>  @override<br>  Widget build(BuildContext context) {<br>    return MaterialApp(<br>      useInheritedMediaQuery: true,<br>      locale: DevicePreview.locale(context),<br>      builder: DevicePreview.appBuilder,<br>      debugShowCheckedModeBanner: false,<br>      home: const HomeScreen(),<br>    );<br>  }<br>}<br></pre><p>After this setup, your Flutter app can be previewed across multiple virtual devices instantly.</p><h3>Conclusion</h3><p>Building responsive applications is essential for providing a consistent user experience across different devices. Flutter provides powerful layout tools, but testing UI behavior on many screen sizes can still be challenging.</p><p>The <strong>Device Preview package</strong> simplifies this process by allowing developers to simulate different devices, orientations, and languages directly during development. By integrating it into the development workflow, developers can quickly identify UI issues and build more responsive Flutter applications.</p><h3>💬 Feedback &amp; Collaboration</h3><p>If this article sparked a thought, helped you in any way, or left you with questions — I’d love to hear from you!</p><p>📫 <strong>Reach out or connect with me:</strong></p><ul><li>🔗 <strong>GitHub</strong>: <a href="https://github.com/SJA0010">github.com/SJA0010</a></li><li>💼 <strong>LinkedIn</strong>: <a href="http://www.linkedin.com/in/subhan-abbas">www.linkedin.com/in/subhan-abbas</a>i</li><li>📧 <strong>Email</strong>: <a href="/service/mailto:MSJA010@gmail.com">MSJA010@gmail.com</a></li><li>💬 <strong>WhatsApp</strong>: <a href="https://wa.me/923317364550">+923</a>317364550</li></ul><p>⭐️ If you found value in this article, give it a clap, share it with your dev circle, or drop a star on the GitHub repo (if applicable). Your support helps me create more helpful content like this.</p><p><strong>Enquiries here</strong> : <a href="https://github.com/SJA0010">Github </a>, <a href="https://www.linkedin.com/in/subhan-abbasi-03b01b252">LinkedIn</a>, <a href="/service/mailto:MSJA010@gmail.com">Gmail</a>, <a href="https://wa.me/923317364550">whatsapp</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2ad56eb1e870" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ How to Save Contacts to Mobile and Google Contacts in Flutter]]></title>
            <link>https://medium.com/@Subhan_Abbasi/how-to-save-contacts-to-mobile-and-google-contacts-in-flutter-1ecbafc6fa1a?source=rss-aeb18694b0e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/1ecbafc6fa1a</guid>
            <category><![CDATA[oauth2]]></category>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[app-development]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <dc:creator><![CDATA[Subhan Abbasi]]></dc:creator>
            <pubDate>Thu, 19 Jun 2025 17:46:39 GMT</pubDate>
            <atom:updated>2025-06-19T17:46:39.487Z</atom:updated>
            <content:encoded><![CDATA[<p>During one of my app development projects, a client asked me something that seemed simple at first:</p><blockquote><em>“Can we let users save contacts to their phone ?”<br>“Can Users save contacts to their gmail account?”<br>“is it possible to sign-in to google without linking our app to Firebase?”</em></blockquote><p>I had done local data handling plenty of times, but syncing directly with Google Contacts? That was a new challenge. After a few experiments, permissions issues, and an OAuth learning curve, I got it working — both saving to the phone and syncing with Google Contacts.</p><p>This article walks through that exact journey — with a working example and clear steps — so you don’t have to reinvent the wheel.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*57LTWR4O7tpOm8bYT9Yw0Q.png" /></figure><h3>🧭 What You’ll Learn</h3><ul><li>How to use the flutter_contacts package to access and save contacts to the device.</li><li>How to integrate with Google People API to save contacts to a user’s Google account.</li><li>google Sign_in without Firebase</li><li>How to handle permissions, authentication, and request flows cleanly.</li></ul><h3>📦 Saving Contacts to the Device with flutter_contacts</h3><p>Let’s start with the mobile device itself — Android and iOS.</p><h3>1. Add Package to pubspec.yaml</h3><pre>flutter_contacts: ^1.1.6</pre><h3>2. Set Required Permissions</h3><h4>Android (AndroidManifest.xml)</h4><pre>&lt;uses-permission android:name=&quot;android.permission.READ_CONTACTS&quot; /&gt;<br>&lt;uses-permission android:name=&quot;android.permission.WRITE_CONTACTS&quot; /&gt;</pre><p>Add these <strong>above</strong> the &lt;application&gt; tag.</p><h4>iOS (Info.plist)</h4><pre>&lt;key&gt;NSContactsUsageDescription&lt;/key&gt;<br>&lt;string&gt;This app needs contact access to display your contacts.&lt;/string&gt;</pre><h3>🛠️ Example: Displaying Contacts in Flutter</h3><pre>import &#39;package:flutter/material.dart&#39;;<br>import &#39;package:flutter_contacts/flutter_contacts.dart&#39;;<br><br><br>class ContactsPage extends StatefulWidget {<br>  @override<br>  _ContactsPageState createState() =&gt; _ContactsPageState();<br>}<br><br>class _ContactsPageState extends State&lt;ContactsPage&gt; {<br>  List&lt;Contact&gt; contacts = [];<br>  bool permissionDenied = false;<br>  @override<br>  void initState() {<br>    super.initState();<br>    fetchContacts();<br>  }<br>  Future&lt;void&gt; fetchContacts() async {<br>    if (await FlutterContacts.requestPermission()) {<br>      final list = await FlutterContacts.getContacts(withProperties: true);<br>      setState(() =&gt; contacts = list);<br>    } else {<br>      setState(() =&gt; permissionDenied = true);<br>    }<br>  }<br>  @override<br>  Widget build(BuildContext context) {<br>    if (permissionDenied) {<br>      return Center(child: Text(&#39;Permission denied.&#39;));<br>    }<br>    return ListView.builder(<br>      itemCount: contacts.length,<br>      itemBuilder: (context, index) {<br>        final contact = contacts[index];<br>        return ListTile(<br>          title: Text(contact.displayName),<br>          subtitle: Text(contact.phones.isNotEmpty<br>              ? contact.phones.first.number<br>              : &#39;No phone&#39;),<br>        );<br>      },<br>    );<br>  }<br>}</pre><h3>☁️ Saving Contacts to Google Account via Google People API</h3><p>Let’s move to syncing contacts with Google Contacts using the <strong>Google People API</strong>.</p><p>This was the stuck moment for me. The client asked me to implement a functionality that, while creating users, their phone number gets directly saved to the Google account. I asked <strong>Chat GPT </strong>and searched on Medium. But unfortunately, no one had ever written about this….<br>Here is the response that Chat GPT gave.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1002/1*9F0qpyWFYKcLS8HvOYBJeQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2NVZFgOHOmCkw4Cl-bdBGw.png" /></figure><p>I won’t blame Chat GPT here for inefficiency because it is just an AI that gathers information all over the web. No one ever tried to use Google People API for this scope… even though GPT helped me a lot during this work.</p><h3>🧱 Step-by-Step Integration Guide</h3><h3>1. Set Up Google Cloud Project</h3><ul><li>Visit Google Cloud Console</li><li>Create a new project (or use an existing one)</li><li>Go to <strong>APIs &amp; Services &gt; Library</strong></li><li>Search for and enable <strong>People API</strong></li></ul><h3>2. Configure OAuth Consent Screen</h3><ul><li>Choose “External” user type</li><li>Fill out required app details</li><li>Add the following <strong>scope</strong>:</li></ul><pre>https://www.googleapis.com/auth/contacts</pre><ul><li>Add test users (your Gmail account)</li></ul><h3>3. Create OAuth Credentials</h3><ul><li>Go to <strong>Credentials</strong></li><li>Click <strong>Create Credentials &gt; OAuth Client ID</strong></li><li>Choose platform (iOS or Android)</li><li>Provide:</li></ul><p>— Android: package name + SHA-1</p><p>— iOS: bundle ID</p><ul><li>Download your client_id.json</li></ul><h3>4. Add Flutter Packages</h3><pre>google_sign_in: ^6.1.5<br>http: ^0.13.6</pre><h3>5. Authenticate User with Google</h3><pre>import &#39;package:google_sign_in/google_sign_in.dart&#39;;</pre><pre>final GoogleSignIn _googleSignIn = GoogleSignIn(<br>  scopes: [&#39;https://www.googleapis.com/auth/contacts&#39;],<br>);</pre><pre>Future&lt;String?&gt; signInAndGetAccessToken() async {<br>  try {<br>    final account = await _googleSignIn.signIn();<br>    final auth = await account!.authentication;<br>    return auth.accessToken;<br>  } catch (e) {<br>    print(&quot;Sign-in failed: $e&quot;);<br>    return null;<br>  }<br>}</pre><h3>6. Create Contact via Google People API</h3><pre>import &#39;package:http/http.dart&#39; as http;<br>import &#39;dart:convert&#39;;<br><br>Future&lt;void&gt; createGoogleContact(String name, String phoneNumber) async {<br>  final token = await signInAndGetAccessToken();<br>  if (token == null) return;<br>  final response = await http.post(<br>    Uri.parse(&#39;https://people.googleapis.com/v1/people:createContact&#39;),<br>    headers: {<br>      &#39;Authorization&#39;: &#39;Bearer $token&#39;,<br>      &#39;Content-Type&#39;: &#39;application/json&#39;,<br>    },<br>    body: jsonEncode({<br>      &quot;names&quot;: [<br>        {&quot;givenName&quot;: name}<br>      ],<br>      &quot;phoneNumbers&quot;: [<br>        {&quot;value&quot;: phoneNumber}<br>      ]<br>    }),<br>  );<br>  if (response.statusCode == 200) {<br>    print(&#39;✅ Contact created in Google account&#39;);<br>  } else {<br>    print(&#39;❌ Failed: ${response.body}&#39;);<br>  }<br>}</pre><h3>7. Add to Your Flutter UI</h3><pre>TextEditingController nameController = TextEditingController();<br>TextEditingController phoneController = TextEditingController();</pre><pre>void onSave() {<br>  final name = nameController.text.trim();<br>  final phone = phoneController.text.trim();<br>  createGoogleContact(name, phone);<br>}</pre><h3>⚠️ Notes &amp; Gotchas</h3><ul><li>For production use, your app must go through <strong>OAuth verification</strong> by Google.</li><li>Make sure your <strong>SHA-1 key is correctly set</strong> in your Google Console (especially for Android builds).</li><li>Only whitelisted test users can use the integration before verification.</li></ul><h3>💬 Feedback &amp; Collaboration</h3><p>If this article helped you, sparked a new idea, or left you with a question — I’d love to hear from you. I welcome feedback, clarifications, and even requests for future articles on specific topics or errors you’ve faced.</p><p>Feel free to reach out, connect, or just say hi 👋</p><p>📫 <strong>Reach out or connect with me:</strong></p><ul><li>🔗 <strong>GitHub</strong>: <a href="https://github.com/SJA0010">github.com/SJA0010</a></li><li>💼 <strong>LinkedIn</strong>: <a href="http://www.linkedin.com/in/subhan-abbas">www.linkedin.com/in/subhan-abbas</a>i</li><li>📧 <strong>Email</strong>: <a href="/service/mailto:MSJA010@gmail.com">MSJA010@gmail.com</a></li><li>💬 <strong>WhatsApp</strong>: <a href="https://wa.me/923317364550">+923317364550</a></li></ul><p>⭐️ If you found value in this article, give it a clap, share it with your dev circle, or drop a star on the GitHub repo (if applicable). Your support helps me create more helpful content like this.</p><p><strong>Enquiries here</strong> : <a href="https://github.com/SJA0010">Github </a>, <a href="https://www.linkedin.com/in/subhan-abbasi-03b01b252">LinkedIn</a>, <a href="/service/mailto:MSJA010@gmail.com">Gmail</a>, <a href="https://wa.me/923317364550">whatsapp</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1ecbafc6fa1a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Fundamentals Key Dart and Flutter Concepts jsonEncode/Decode, async/await, try-catch…]]></title>
            <link>https://medium.com/@Subhan_Abbasi/understanding-fundamentals-key-dart-and-flutter-concepts-jsonencode-decode-async-await-try-catch-019776429afb?source=rss-aeb18694b0e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/019776429afb</guid>
            <category><![CDATA[error-handling]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[flutter-app-development]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Subhan Abbasi]]></dc:creator>
            <pubDate>Mon, 16 Jun 2025 17:31:31 GMT</pubDate>
            <atom:updated>2025-06-16T22:43:40.873Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Understanding Fundamentals Key Dart and Flutter Concepts </strong><strong><em>jsonEncode/Decode</em>, </strong><strong><em>async/await</em>, </strong><strong><em>try-catch</em>, </strong><strong><em>throw/rethrow</em></strong> and Error Handling</h3><blockquote>I<em>n day-to-day Flutter development, some foundational Dart concepts play a critical role in building responsive, reliable, and scalable apps. Concepts like </em><em>jsonEncode, </em><em>async/await, </em><em>try-catch, </em><em>throw, and the use of </em><em>mounted often come up when working with APIs, UI state, or error handling.</em></blockquote><blockquote><em>Despite being fundamental, many developers (especially beginners) use them without fully understanding their purpose or best practices. This article provides a practical explanation of each concept, how it’s used, and why it matters.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9pDQfE-XZD0Zqk-wCL_GfQ.png" /></figure><h3>🧾 1. JSON Encoding &amp; Decoding (jsonEncode, jsonDecode)</h3><p>When communicating with APIs or saving data locally, we often deal with <strong>JSON (JavaScript Object Notation)</strong>. Dart gives us tools to convert between Dart objects and JSON strings.</p><h3>🔁 What They Do:</h3><ul><li>jsonEncode → Converts a Dart Map or List into a JSON String.</li><li>jsonDecode → Parses a JSON String back into a Dart object.</li></ul><h3>✅ Example:</h3><pre>import &#39;dart:convert&#39;;<br><br>void main() {<br>  final user = {&#39;name&#39;: &#39;Subhan&#39;, &#39;age&#39;: 25};<br><br>  final jsonString = jsonEncode(user);<br>  print(jsonString); // {&quot;name&quot;:&quot;Subhan&quot;,&quot;age&quot;:25}<br><br>  final parsed = jsonDecode(jsonString);<br>  print(parsed[&#39;name&#39;]); // Subhan<br>}</pre><h3>📌 Use Case:</h3><p>Almost every API you interact with in Flutter returns JSON. You’ll need to decode it into Dart models and encode user inputs when sending data back.</p><h3>⏳ 2. Asynchronous Programming (async &amp; await)</h3><p>Flutter is single-threaded. That means long-running tasks (like network calls) <strong>must be asynchronous</strong> to keep the UI from freezing.</p><h3>🔁 What They Do:</h3><ul><li>async marks a function as asynchronous.</li><li>await pauses execution until a Future completes.</li></ul><h3>✅ Example:</h3><pre>Future&lt;void&gt; loadUser() async {<br>  print(&#39;Loading user...&#39;);<br>  await Future.delayed(Duration(seconds: 2));<br>  print(&#39;User loaded&#39;);<br>}</pre><p>Without await, your code continues running while the operation is still in progress — often resulting in race conditions and UI bugs.</p><h3>🧱 3. Widget Lifecycle Awareness: mounted</h3><p>Inside StatefulWidgets, calling setState() <strong>after the widget is disposed</strong> causes runtime errors. This usually happens when asynchronous operations finish <em>after</em> the widget is removed from the tree.</p><h3>🔁 What mounted Does:</h3><p>mounted is a boolean that checks whether the widget is still in the widget tree (i.e. &quot;alive&quot;).</p><h3>✅ Example:</h3><pre>@override<br>void initState() {<br>  super.initState();<br>  fetchData();<br>}<br><br>Future&lt;void&gt; fetchData() async {<br>  await Future.delayed(Duration(seconds: 2));<br>  if (mounted) {<br>    setState(() {});<br>  }<br>}</pre><p>Always check mounted before calling setState() from async methods to prevent crashes.</p><h3>⚠️ 4. Handling Errors: try, catch, finally</h3><p>In Dart, you don’t want uncaught exceptions crashing your app. That’s why try-catch is essential.</p><h3>🔁 What They Do:</h3><ul><li>try: Contains code that might fail.</li><li>catch: Executes if an error occurs.</li><li>finally: Runs no matter what — even if there’s an error.</li></ul><h3>✅ Example:</h3><pre>void risky() {<br>  try {<br>    loading.start();<br>    int x = 10 ~/ 0;<br>  } catch (e) {<br>    print(&quot;Caught: $e&quot;);<br>  } finally {<br>    print(&quot;Cleaning up...&quot;);<br>    loading.end();<br>  }<br>}</pre><p>Use finally for cleanup logic like hiding loaders, closing connections, etc.</p><h3>🚨 5. Throwing and Rethrowing Errors (throw, rethrow)</h3><p>Sometimes, you want to create your own exceptions or log them before passing up.</p><h3>🔁 What They Do:</h3><ul><li>throw: Manually creates an error.</li><li>rethrow: Re-raises the same error after handling it.</li></ul><h3>✅ Example:</h3><pre>void validateAge(int age) {<br>  if (age &lt; 18) {<br>    throw Exception(&quot;User must be 18+&quot;);<br>  }<br>}<br><br><br>void fetchData() {<br>  try {<br>    throw Exception(&quot;API failed&quot;);<br>  } catch (e) {<br>    logError(e);<br>    rethrow;<br>  }<br>}</pre><p>This is especially useful in repositories, where you want to log the error but let the view layer decide how to handle it.</p><h3>🧰 Best Practices for Exception &amp; Error Handling</h3><p>📌 Here’s how to stay safe, scalable, and clean:</p><ol><li><strong>Always wrap network or DB calls in try-catch.</strong></li><li><strong>Don’t call </strong><strong>setState in async functions without checking </strong><strong>mounted.</strong></li><li><strong>Log meaningful errors — not just </strong><strong>e.toString().</strong></li><li><strong>Use structured results (</strong><strong>Result, </strong><strong>ApiResponse, etc.) instead of throwing errors in business logic.</strong></li><li><strong>Use custom exceptions when needed for clarity.</strong></li></ol><h3>✅ Example: Structured API Result</h3><pre>class ApiResult&lt;T&gt; {<br>  final T? data;<br>  final String? error;<br><br>  ApiResult.success(this.data) : error = null;<br>  ApiResult.failure(this.error) : data = null;<br>}<br><br><br>Future&lt;ApiResult&lt;User&gt;&gt; getUser() async {<br>  try {<br>    final res = await http.get(Uri.parse(&#39;...&#39;));<br>    if (res.statusCode == 200) {<br>      final json = jsonDecode(res.body);<br>      return ApiResult.success(User.fromJson(json));<br>    }<br>    return ApiResult.failure(&quot;Server error&quot;);<br>  } catch (e) {<br>    return ApiResult.failure(&quot;Something went wrong: $e&quot;);<br>  }<br>}</pre><h3>🧠 Final Thoughts</h3><p>These tools are not optional — they are essential. Mastering them will help you prevent runtime errors, improve performance, and write more predictable code.</p><p>You don’t have to memorize everything, but knowing <strong>when</strong> and <strong>why</strong> to use things like await, mounted, try/catch, and structured error handling will set you apart as a thoughtful Flutter developer.</p><p>If you&#39;re building serious apps or planning to scale your projects, make these tools part of your coding habit — not just one-off fixes.</p><h3>💬 Feedback &amp; Collaboration</h3><p>If this article sparked a thought, helped you in any way, or left you with questions — I’d love to hear from you!</p><p>📫 <strong>Reach out or connect with me:</strong></p><ul><li>🔗 <strong>GitHub</strong>: <a href="https://github.com/SJA0010">github.com/SJA0010</a></li><li>💼 <strong>LinkedIn</strong>: <a href="http://www.linkedin.com/in/subhan-abbas">www.linkedin.com/in/subhan-abbas</a>i</li><li>📧 <strong>Email</strong>: <a href="/service/mailto:MSJA010@gmail.com">MSJA010@gmail.com</a></li><li>💬 <strong>WhatsApp</strong>: <a href="https://wa.me/923317364550">+923317364550</a></li></ul><p>⭐️ If you found value in this article, give it a clap, share it with your dev circle, or drop a star on the GitHub repo (if applicable). Your support helps me create more helpful content like this.</p><p><strong>Enquiries here</strong> : <a href="https://github.com/SJA0010">Github </a>, <a href="https://www.linkedin.com/in/subhan-abbasi-03b01b252">LinkedIn</a>, <a href="/service/mailto:MSJA010@gmail.com">Gmail</a>, <a href="https://wa.me/923317364550">whatsapp</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=019776429afb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MVVM, Clean Architecture, and Modular Structure in Flutter: What You Need to Know]]></title>
            <link>https://medium.com/@Subhan_Abbasi/mvvm-clean-architecture-and-modular-structure-in-flutter-what-you-need-to-know-8f24d7e47d67?source=rss-aeb18694b0e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/8f24d7e47d67</guid>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[clean-architecture]]></category>
            <category><![CDATA[mvvm]]></category>
            <category><![CDATA[architecture]]></category>
            <dc:creator><![CDATA[Subhan Abbasi]]></dc:creator>
            <pubDate>Sun, 15 Jun 2025 17:23:27 GMT</pubDate>
            <atom:updated>2025-06-15T17:23:27.512Z</atom:updated>
            <content:encoded><![CDATA[<h3>🚀 Introduction</h3><blockquote><strong><em>During my early years of Flutter development, I often found myself stuck — not because of coding bugs, but because of confusion.</em></strong><em><br> I remember sitting late at night, refactoring the same project for the third time, wondering:</em></blockquote><ul><li>“Why does everyone argue about layer-first vs feature-first — does it even matter?”</li><li>“Is MVVM supposed to be Clean Architecture?”</li></ul><blockquote><em>At the time, every tutorial seemed to present a different folder structure, a different pattern, or a new “best practice.” It felt overwhelming. And I wasn’t alone — friends, colleagues, even students I mentored had the same questions.</em></blockquote><blockquote><em>That’s when I realized most of us were mixing up three very different but related ideas:<br> </em><strong><em>Architecture, Patterns, and Structure.</em></strong></blockquote><blockquote><em>This article is my attempt to share what I’ve learned — through trial, error, and many late-night Google rabbit holes — and to finally clear the fog around these concepts. Let’s break it all down in a way that actually makes sense.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JHWTzXAVhH_Gx5uWUv5FIg.png" /></figure><h3>🏗️ 1. What is Structure?</h3><p>Structure refers to <strong>how you organize your codebase</strong> — primarily your folders and files. It doesn’t dictate behavior, just arrangement.</p><h3>🧩 Layer-First Structure</h3><ul><li>Folders are grouped by type: models/, views/, viewmodels/, etc.</li><li>Common in small or medium apps.</li></ul><h3>🧱 Feature-First Structure</h3><ul><li>Folders are grouped by feature: auth/, products/, users/.</li><li>Better for scaling large apps and collaborating in teams.</li></ul><h3>🎯 2. What Are Patterns?</h3><p>Patterns are common, reusable solutions to recurring problems. In Flutter, the most common UI patterns are:</p><h3>🧩 MVC (Model-View-Controller)</h3><h4>🔷 Definition:</h4><p>MVC divides your app into three parts:</p><ul><li><strong>Model</strong> → Data and business logic</li><li><strong>View</strong> → UI elements</li><li><strong>Controller</strong> → Handles interaction between Model and View</li></ul><h4>📱 Flutter MVC Example:</h4><ul><li><strong>Model</strong>: UserModel.dart</li><li><strong>View</strong>: LoginScreen.dart</li><li><strong>Controller</strong>: LoginController.dart</li></ul><p><strong>Flow:</strong></p><ol><li>View receives input</li><li>Controller processes it and communicates with the Model</li><li>Model returns data; Controller updates the View</li></ol><h3>🧩 MVVM (Model-View-ViewModel)</h3><h4>🔷 Definition:</h4><p>MVVM separates UI from logic using a ViewModel:</p><ul><li><strong>Model</strong>: Business data</li><li><strong>ViewModel</strong>: Handles state and logic</li><li><strong>View</strong>: UI</li></ul><p>In Flutter, this often uses <strong>Provider</strong>, <strong>Riverpod</strong>, or <strong>ChangeNotifier</strong>.</p><h4>📱 Flutter MVVM Example:</h4><ul><li><strong>Model</strong>: Product.dart</li><li><strong>ViewModel</strong>: ProductViewModel.dart</li><li><strong>View</strong>: ProductListScreen.dart</li></ul><p><strong>Flow:</strong></p><ol><li>View calls ViewModel method (fetchProducts())</li><li>ViewModel updates state</li><li>View rebuilds reactively</li></ol><h3>🔁 MVC vs MVVM in Flutter</h3><p>Aspect MVC MVVM Usage in Flutter Rarely used Common (especially with Provider) Separation Weaker (Controller &amp; View tied) Strong (View ↔ ViewModel separation) State Handling Manual Built-in via ChangeNotifier UI Updates Explicit calls Reactive listeners Best For Small apps Scalable, testable apps</p><h3>🧱 3. What is Architecture?</h3><h3>🧠 Clean Architecture</h3><h4>📌 Definition:</h4><p>Clean Architecture is a layered architecture that enforces <strong>separation of concerns</strong> and <strong>dependency rules</strong>:</p><ul><li>Inner layers never depend on outer ones.</li><li>Business logic is isolated from frameworks and UI.</li></ul><h4>🏛 Typical Layer Diagram:</h4><pre>┌────────────────────┐<br>│   Presentation     │ → UI (Screens, Widgets)<br>└────────────────────┘<br>         ↓<br>┌────────────────────┐<br>│   Application      │ → ViewModels, UseCases<br>└────────────────────┘<br>         ↓<br>┌────────────────────┐<br>│   Domain Layer     │ → Core business logic<br>└────────────────────┘<br>         ↓<br>┌────────────────────┐<br>│   Data Layer       │ → APIs, DBs, Repositories<br>└────────────────────┘</pre><h3>✅ Clean Architecture in Flutter:</h3><ul><li><strong>Presentation</strong> → Widgets</li><li><strong>Application</strong> → ViewModel/Controller</li><li><strong>Domain</strong> → UseCases/Entities</li><li><strong>Data</strong> → Repository, DataSource</li></ul><h3>📦 Modular Architecture</h3><h4>📌 Definition:</h4><p>Modular Architecture breaks the app into self-contained <strong>feature modules</strong>, each with its own structure:</p><pre>features/<br>├── auth/<br>│   ├── model/<br>│   ├── viewmodel/<br>│   ├── view/<br>│   └── repository/</pre><pre>├── customer/<br>│   ├── model/<br>│   ├── viewmodel/<br>│   ├── view/<br>│   └── repository/</pre><p>✅ Makes code easier to:</p><ul><li>Test</li><li>Maintain</li><li>Assign to different teams</li></ul><h3>🔍 4. Clearing the Confusion</h3><h3>🤔 Is MVVM = Clean Architecture?</h3><p>❌ Not exactly.</p><p>Concept Focus MVVM UI logic and state separation Clean Architecture Full app layering and data flow Modular Architecture Feature-based folder structure</p><p>✅ <strong>MVVM can live inside Clean Architecture</strong>, usually in the Presentation layer.</p><p>👉 <strong>Clean + Modular + MVVM</strong> = a rock-solid, scalable architecture.</p><h3>🧱 5. My Recommended Structure — OmniVolve Structure</h3><p>Over the years, I’ve refined a structure that works seamlessly with MVVM and Clean Architecture. I call it <strong>OmniVolve</strong> (All + Evolve). It supports OOP, mixins, scalability, and fast development cycles. My OmniVolve structure combines all the best practices into one scalable foundation.</p><h3>📁 Folder Structure</h3><pre>lib/<br>│<br>├── core/                  # Global constants, helpers, etc.<br>│   ├── errors/<br>│   ├── theme/<br>│   ├── utils/<br>│   └── constants/<br>│<br>├── services/<br>│   ├── firebase_service/<br>│   ├── api/<br>│   └── local_storage/<br>│<br>├── features/<br>│   ├── auth/<br>│   │   ├── model/<br>│   │   ├── viewmodel/<br>│   │   └── view/<br>│   │<br>│   ├── customer/<br>│   │   ├── model/<br>│   │   ├── viewmodel/<br>│   │   └── view/<br>│   │<br>│   └── product/<br>│       ├── model/<br>│       ├── viewmodel/<br>│       └── view/<br>│<br>├── repositories/         # Interfaces and implementations<br>├── routes/               # Navigation<br>├── widgets/              # Global reusable widgets<br>├── app.dart<br>└── main.dart</pre><h3>💬 Feedback &amp; Collaboration</h3><p>If this article sparked a thought, helped you in any way, or left you with questions — I’d love to hear from you!</p><p>📫 <strong>Reach out or connect with me:</strong></p><ul><li>🔗 <strong>GitHub</strong>: <a href="https://github.com/SJA0010">github.com/SJA0010</a></li><li>💼 <strong>LinkedIn</strong>: <a href="http://www.linkedin.com/in/subhan-abbas">www.linkedin.com/in/subhan-abbas</a>i</li><li>📧 <strong>Email</strong>: <a href="/service/mailto:MSJA010@gmail.com">MSJA010@gmail.com</a></li><li>💬 <strong>WhatsApp</strong>: <a href="https://wa.me/923317364550">+923317364550</a></li></ul><p>⭐️ If you found value in this article, give it a clap, share it with your dev circle, or drop a star on the GitHub repo (if applicable). Your support helps me create more helpful content like this.</p><p><strong>Enquiries here</strong> : <a href="https://github.com/SJA0010">Github </a>, <a href="https://www.linkedin.com/in/subhan-abbasi-03b01b252">LinkedIn</a>, <a href="/service/mailto:MSJA010@gmail.com">Gmail</a>, <a href="https://wa.me/923317364550">whatsapp</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8f24d7e47d67" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Facebook auth easy way]]></title>
            <link>https://medium.com/@Subhan_Abbasi/facebook-auth-easy-way-3e8114d8b70a?source=rss-aeb18694b0e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/3e8114d8b70a</guid>
            <category><![CDATA[firebase]]></category>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[facebook]]></category>
            <dc:creator><![CDATA[Subhan Abbasi]]></dc:creator>
            <pubDate>Fri, 30 Aug 2024 18:40:39 GMT</pubDate>
            <atom:updated>2024-08-30T18:42:54.585Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello, everyone! As you know, there is a motivation behind every one of my articles, but this one wasn’t motivated by inspiration; it was driven by necessity. Recently, I was working on an international project and needed to implement Facebook authentication through Firebase. I read a lot of articles, went through all the available resources, and even took help from ChatGPT-4, but all efforts seemed to lead to a dead end. So, here I am, after successfully implementing Facebook authentication, sharing an easier solution for you, as always.</p><h3><strong>lets begin!!!!</strong></h3><figure><img alt="Facebook Auth" src="https://cdn-images-1.medium.com/max/190/1*TFy98xGUvKqXXYSPn-O6wA.gif" /><figcaption>my credentials were already saved as I had Login before</figcaption></figure><h3>Step 1: Configure Facebook App</h3><ul><li><strong>Create a Meta Developer Account</strong>: Start by creating a developer account on Meta for Developers. Once you have a developer account, you will be eligible to create a developer app. This app will act as a third-party API and provide an App ID, App Secret, and Client Token. These three pieces of information are essential for all future procedures.</li><li><strong>Create a Test App</strong>: I suggest creating a test app. If you create a regular app, you will need to make it active by completing all required details. A test app simplifies the process.</li><li><strong>Locate App ID and App Secret</strong>: You can find the App ID and App Secret in App Settings → Basic.</li><li><strong>Find the Client Token</strong>: The Client Token is located in App Settings → Advanced.</li></ul><blockquote><strong><em>Note</em></strong><em>: If you do not create a test app and instead decide to create a proper app, you will be required to provide the following:</em></blockquote><blockquote><strong>-App Icon</strong>: Ensure it has a white background.</blockquote><blockquote><strong>-User Data Deletion URL</strong>: Ask ChatGPT to create a file, upload it on GitHub, and provide its URL.</blockquote><blockquote><strong>-Package Names</strong>: Use the format com.example.&quot;your app name&quot;.</blockquote><blockquote><strong>-Class Name</strong>: Use the format com.example.&quot;your app name&quot;.MainActivity.</blockquote><blockquote><strong>-Key Hashes</strong>: Obtain the SHA-1 key and convert it into key hashes using the Temeko converter website.</blockquote><h3>Step 2: Configure Firebase</h3><ul><li><strong>Create a Firebase Project</strong>: Go to the Firebase Console and create a new project or use an existing one.</li><li><strong>Add Your App</strong>: Register your app (iOS/Android/Web) in the Firebase project settings.</li><li><strong>Enable Facebook Authentication</strong>: In the Firebase Console, go to the “Authentication” section.</li><li><strong>Select Sign-in Method</strong>: Choose “Facebook” and enable it</li><li><strong>Enter Facebook App ID and App Secret</strong>: Enter the App ID and App Secret obtained from the Facebook developer console.</li></ul><blockquote><strong><em>Note</em></strong><em>: Ensure that your VS Code or Android Studio has the Facebook SDK installed.</em></blockquote><h3>Step 3: dependencies and permissions set-up</h3><ol><li><strong>Add Dependencies to Your Flutter Project </strong>Open your pubspec.yaml file and add the following dependency: <strong>flutter_facebook_auth: ^7.1.0</strong></li></ol><pre>dependencies:<br>  flutter:<br>    sdk: flutter<br>  cupertino_icons: ^1.0.6<br>  flutter_facebook_auth: ^7.1.0</pre><p>2. <strong>edit AndroidManifest.xml : </strong>Add the Facebook App ID to your AndroidManifest.xml file located in android/app/src/main/AndroidManifest.xml:</p><pre>&lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&gt;<br>    &lt;uses-permission android:name=&quot;android.permission.INTERNET&quot;/&gt;<br>    &lt;uses-permission android:name=&quot;android.permission.ACCESS_NETWORK_STATE&quot;/&gt;<br>//on the top</pre><pre> &lt;meta-data android:name=&quot;com.facebook.sdk.ApplicationId&quot; android:value=&quot;@string/facebook_app_id&quot;/&gt;<br> &lt;meta-data android:name=&quot;com.facebook.sdk.ClientToken&quot; android:value=&quot;@string/facebook_client_token&quot;/&gt;<br> //in the application tag</pre><p>To enable Facebook Authentication, you need to add two permissions for internet access and include specific meta-data within the &lt;application&gt; tag of your AndroidManifest.xml. The meta-data should contain your Facebook App ID and other necessary configurations. Since the structure of AndroidManifest.xml can vary depending on your Flutter version, if you&#39;re unsure where to place these entries, you can share your AndroidManifest.xml with ChatGPT and request to &quot;add these without changing the existing Flutter version structure.&quot;</p><blockquote><strong>Note</strong>: After making changes, clean your project and run <em>flutter pub get</em>, then debug your code to ensure there are no errors in <em>AndroidManifest.xml</em>.</blockquote><p>3.<strong> Create </strong><strong>strings.xml</strong>: Ensure that you have added the string resource for facebook_app_id in android/app/src/main/res/values/strings.xml. If this file does not already exist, create a new file and add the following code lines:</p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br>&lt;resources&gt;<br><br>&lt;string name=&quot;facebook_app_id&quot;&gt;your app id here &lt;/string&gt;<br>&lt;string name=&quot;fb_login_protocol_scheme&quot;&gt;fb your app id here&lt;/string&gt;<br>&lt;string name=&quot;facebook_client_token&quot;&gt;your client token here&lt;/string&gt;<br><br>&lt;/resources&gt;</pre><p>The client token and app ID fetched from your test app need to be placed here. In fb_login_protocol, you must include the app ID again but with the prefix &quot;fb&quot;. For example, use &quot;fb1242353465756856876978&quot;.</p><blockquote><strong>Note</strong>: There is no need to make further edits to build.gradle. The changes made to initialize Firebase are sufficient.</blockquote><h3><strong>step 4 : Coding and UI.</strong></h3><p>In this code, we create a simple UI for Facebook Authentication in a Flutter app using Firebase. The screen starts with a Sign In button. Once the user logs in, it displays the user’s profile picture, name, and a Sign out button. When the user presses the “Sign In” button, the app initiates the Facebook login process. If successful, it updates the UI to show the user’s profile picture, name, and the “Sign Out” button. If the user presses “Sign Out,” the app logs them out and reverts to the initial login screen.</p><pre>import &#39;package:flutter/material.dart&#39;;<br>import &#39;package:firebase_auth/firebase_auth.dart&#39;;<br>import &#39;package:flutter_facebook_auth/flutter_facebook_auth.dart&#39;;<br><br>class FacebookAuthentication extends StatefulWidget {<br>  const FacebookAuthentication({Key? key}) : super(key: key);<br><br>  @override<br>  State&lt;FacebookAuthentication&gt; createState() =&gt; _FacebookAuthenticationState();<br>}<br><br>class _FacebookAuthenticationState extends State&lt;FacebookAuthentication&gt; {<br>  final FirebaseAuth _auth = FirebaseAuth.instance;<br>  User? _user;<br>  String? _errorMessage;<br>  String? _userName;<br>  String? _userProfilePicture;<br><br>  @override<br>  void initState() {<br>    super.initState();<br>    _auth.authStateChanges().listen(_onAuthStateChanged);<br>  }<br><br>  Future&lt;void&gt; _onAuthStateChanged(User? user) async {<br>    if (user != null) {<br>      setState(() {<br>        _user = user;<br>      });<br><br>      // Fetch additional user details from Facebook<br>      final userData = await FacebookAuth.instance.getUserData();<br>      setState(() {<br>        _userName = userData[&#39;name&#39;];<br>        _userProfilePicture = userData[&#39;picture&#39;][&#39;data&#39;][&#39;url&#39;];<br>      });<br>    } else {<br>      setState(() {<br>        _user = null;<br>        _userName = null;<br>        _userProfilePicture = null;<br>      });<br>    }<br>  }<br><br>  Future&lt;void&gt; signInWithFacebook() async {<br>    try {<br>      setState(() {<br>        _errorMessage = null;<br>      });<br><br>      // Trigger the Facebook sign-in flow<br>      final LoginResult result = await FacebookAuth.instance.login();<br><br>      if (result.status == LoginStatus.success) {<br>        // Get the Facebook access token<br>        final AccessToken? facebookAccessToken = result.accessToken;<br><br>        if (facebookAccessToken != null) {<br>          // Create a credential for Firebase<br>          final OAuthCredential credential =<br>              FacebookAuthProvider.credential(facebookAccessToken.token);<br><br>          // Sign in with the credential<br>          await _auth.signInWithCredential(credential);<br>        } else {<br>          setState(() {<br>            _errorMessage = &#39;Failed to get Facebook access token.&#39;;<br>          });<br>        }<br>      } else if (result.status == LoginStatus.cancelled) {<br>        setState(() {<br>          _errorMessage = &#39;Facebook login cancelled by user.&#39;;<br>        });<br>      } else if (result.status == LoginStatus.failed) {<br>        setState(() {<br>          _errorMessage = &#39;Facebook login failed: ${result.message}&#39;;<br>        });<br>      }<br>    } catch (e) {<br>      setState(() {<br>        _errorMessage = &#39;Error during Facebook sign-in: $e&#39;;<br>      });<br>    }<br>  }<br><br>  Future&lt;void&gt; signOut() async {<br>    await _auth.signOut();<br>    setState(() {<br>      _user = null;<br>      _userName = null;<br>      _userProfilePicture = null;<br>    });<br>  }<br><br>  @override<br>  Widget build(BuildContext context) {<br>    return Scaffold(<br>      appBar: AppBar(<br>        centerTitle: true,<br>        title: const Text(&quot;Firebase Authentications&quot;),<br>      ),<br>      body: Padding(<br>        padding: const EdgeInsets.all(10),<br>        child: Center(<br>          child: _user != null<br>              ? Column(<br>                  mainAxisAlignment: MainAxisAlignment.center,<br>                  children: [<br>                    // Display Profile Picture<br>                    if (_userProfilePicture != null)<br>                      CircleAvatar(<br>                        backgroundImage: NetworkImage(_userProfilePicture!),<br>                        radius: 40,<br>                      ),<br>                    const SizedBox(height: 10),<br>                    // Display Name<br>                    Text(<br>                      _userName ?? &#39;User&#39;,<br>                      style: Theme.of(context).textTheme.headline6,<br>                    ),<br>                    const SizedBox(height: 20),<br>                    ElevatedButton(<br>                      style: ElevatedButton.styleFrom(<br>                        backgroundColor: Colors.red[700],<br>                      ),<br>                      onPressed: signOut,<br>                      child: const Text(&quot;Sign Out&quot;),<br>                    ),<br>                  ],<br>                )<br>              : Column(<br>                  mainAxisAlignment: MainAxisAlignment.center,<br>                  children: [<br>                    const Text(<br>                      &quot;Facebook Sign In&quot;,<br>                      style: TextStyle(fontSize: 24),<br>                    ),<br>                    const SizedBox(height: 20),<br>                    ElevatedButton(<br>                      style: ElevatedButton.styleFrom(<br>                        backgroundColor: Colors.blue[700],<br>                      ),<br>                      onPressed: () {<br>                        signInWithFacebook();<br>                      },<br>                      child: const Text(&quot;Sign In&quot;),<br>                    ),<br>                    if (_errorMessage != null) ...[<br>                      const SizedBox(height: 10),<br>                      Text(<br>                        _errorMessage!,<br>                        style: const TextStyle(color: Colors.red),<br>                      ),<br>                    ],<br>                  ],<br>                ),<br>        ),<br>      ),<br>    );<br>  }<br>}</pre><h3>Code Explanation:</h3><ol><li><strong>Imports</strong>: The code uses firebase_auth for Firebase Authentication, flutter_facebook_auth for Facebook login, and material.dart for UI components.</li><li><strong>State Management</strong>: The Stateful Widget manages the authentication state using FirebaseAuth.instance. The _user variable holds the logged-in user, and _errorMessage stores any errors.</li><li><strong>Sign In with Facebook</strong>: The signInWithFacebook() method handles Facebook login, retrieves the access token, creates Firebase credentials, and signs the user in. Errors are captured and displayed using _errorMessage.</li><li><strong>Sign Out</strong>: The signOut() method logs the user out and resets the UI state.</li><li><strong>UI Design</strong>:</li></ol><ul><li><strong>Before Login</strong>: Displays “Sign In” button.</li><li><strong>After Login</strong>: Shows the user’s profile picture, name, and “Sign Out” button.</li></ul><p>This setup provides a straightforward way to implement Facebook Authentication with a clean, user-friendly interface.</p><h3><strong>Further Resources :</strong></h3><p>If any further issues or exceptions arise — though I hope they won’t — you can refer to the following reliable articles and websites for guidance.</p><ul><li><a href="https://mobterest.medium.com/how-to-provide-key-hashes-for-your-android-app-to-facebook-developer-platform-flutter-4d8d1e3b312">click to know more about “ how to get hashes key”</a></li><li><a href="https://developers.facebook.com/docs/facebook-login/android">meta original article for fb auth</a></li><li><a href="https://medium.com/feedflood/setup-firebase-cli-and-initialize-firebase-sdk-for-cloud-functions-3f15af217c59">how to intiailze firebase</a> with CLI</li><li><a href="https://github.com/SJA0010/auth_app_structure">my fully working all authentcations code on github</a></li><li><a href="https://developers.facebook.com/">here to create meta app</a></li></ul><h3><strong>Stay Connected</strong></h3><p>If you found these tips helpful or have any questions, feel free to leave a comment below. Stay tuned for more Flutter tutorials and insights. Happy developing!</p><p><strong>note :</strong> if you don’t wanna install flutter in laptop, use<a href="https://idx.dev/"> “Project IDX”</a> . its a best online tool for programmers to program your code online.</p><p><strong>Enquiries here</strong> : <a href="https://github.com/SJA0010">Github </a>, <a href="https://www.linkedin.com/in/subhan-abbasi-03b01b252">LinkedIn</a>, <a href="/service/mailto:MSJA010@gmail.com">Gmail</a>, <a href="https://wa.me/923317364550">whatsapp</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3e8114d8b70a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Easy Tap Bar (Flutter)]]></title>
            <link>https://medium.com/@Subhan_Abbasi/easy-tap-bar-flutter-478de4737492?source=rss-aeb18694b0e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/478de4737492</guid>
            <category><![CDATA[easy-use]]></category>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[appbar]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[tab-bar]]></category>
            <dc:creator><![CDATA[Subhan Abbasi]]></dc:creator>
            <pubDate>Thu, 15 Aug 2024 06:53:28 GMT</pubDate>
            <atom:updated>2024-08-15T06:53:28.932Z</atom:updated>
            <content:encoded><![CDATA[<p>My grandfather used to narrate a story of his time, when he lived at countryside. he had a sub-born and backward personality which insist him to resist adaption to new developments. and that ignorance cost him a great lost. he never get use to machines and used to work in crop fields manually that cost him a huge waste of time, meanwhile his co-workers use machines and earn relatively more in the same time. this teach me a great lesson that never resist things which benefits you. I’m narrating you this story to let you know the importance of new inventions. same is the case with programming, if you will never adopt new built-in widgets or AI generated tools, you will loss a lot of time and effort.</p><p>similarly I used to make custom tab-bar that was very tricky and using indexing to change screens was logically complex. Everything changed when I discovered the AppTabBar. This built-in widget not only simplified the process of adding tabs to my app but also brought a level of polish and performance that was hard to match with a custom solution. it was professional way of coding.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/422/1*vvjOL3tFOpftU4IyQWB91w.gif" /><figcaption>visual display of Tab Bar, I’m creating</figcaption></figure><p>Lets start. i will try my best to make it usage simple for you.</p><p>first of all, wrap your scaffold or the main container where you are implimenting AppTabBar with DefaultTabController . it will ask length argument. then in bottom of AppBar use TabBar widget.</p><pre>return DefaultTabController(<br>      length: 3,<br>      child: Scaffold(<br>        appBar: AppBar(<br>          backgroundColor: Colors.teal,<br>          title: Center(<br>            child: Text(<br>              &quot;Tab Bar&quot;,<br>              style: TextStyle(<br>                  fontSize: 25,<br>                  color: Colors.white,<br>                  fontWeight: FontWeight.w700),<br>            ),<br>          ),<br>          bottom: TabBar(<br>            unselectedLabelColor: Colors.white.withOpacity(0.7),<br>            labelColor: Colors.white,<br>            indicatorColor: Colors.white,<br>            tabs: [<br>              Tab(<br>                child: Text(<br>                  &quot;Tab Bar 1&quot;,<br>                ),<br>              ),<br>              Tab(<br>                child: Text(<br>                  &quot;Tab Bar 2&quot;,<br>                ),<br>              ),<br>              Tab(<br>                child: Text(<br>                  &quot;Tab Bar 3&quot;,<br>                ),<br>              ),<br>            ],<br>          ),<br>        ),<br>        body: TabBarView(children: [<br>          Container(<br>            child: Center(<br>              child: Text(<br>                &quot;Page 1&quot;,<br>                style:<br>                    TextStyle(color: Colors.black, fontWeight: FontWeight.w700),<br>              ),<br>            ),<br>          ),<br>          Container(<br>            child: Center(<br>              child: Text(<br>                &quot;Page 2&quot;,<br>                style:<br>                    TextStyle(color: Colors.black, fontWeight: FontWeight.w700),<br>              ),<br>            ),<br>          ),<br>          Container(<br>            child: Center(<br>              child: Text(<br>                &quot;Page 3&quot;,<br>                style:<br>                    TextStyle(color: Colors.black, fontWeight: FontWeight.w700),<br>              ),<br>            ),<br>          ),<br>        ]),<br>      ),<br>    );</pre><p>This Flutter code demonstrates how to create a simple AppBar having TabBar using the DefaultTabController, AppBar, TabBarand TabBarView widgets.</p><p>1. <strong>DefaultTabController</strong> : The DefaultTabController is used to manage the state and behavior of the tabs. Here, it’s set to have a length of 3, meaning there are three tabs.</p><p>2. <strong>Scaffold</strong> : The `Scaffold` widget provides the basic structure of the app, including the `AppBar` and the `TabBarView`.</p><p>3. <strong>AppBar </strong>: The `AppBar` has a teal background and a centered title labeled <strong>“Tab Bar”</strong> with a font size of 25, white color, and bold weight.<br> — The `bottom` property of the `AppBar` houses the `TabBar`, which contains three tabs. Each tab is labeled <em>(“Tab Bar 1”, “Tab Bar 2”, “Tab Bar 3”)</em> and has a white text color that dims slightly when not selected, Tab are the buttons</p><p>4. <strong>TabBar : </strong>The `TabBar` displays the tabs and controls which page is shown in the `TabBarView`. It uses the `unselectedLabelColor` to dim the color of the unselected tabs, `labelColor` for the selected tab, and `indicatorColor` to underline the selected tab in white.</p><p>5. <strong>TabBarView : </strong>The `TabBarView` is responsible for displaying the content associated with each tab. It contains three `Container` widgets, each displaying centered text (“Page 1”, “Page 2”, “Page 3”) with black, bold styling. you can call screens instead of making containers</p><p>This code shows the power and simplicity of Flutter’s built-in widgets, particularly the `AppTabBar`. With minimal code, you can create a functional and aesthetically pleasing tabbed interface, highlighting how built-in widgets simplify complex UI tasks.</p><p><strong>note :</strong> if you don’t wanna install flutter in laptop, use<a href="https://idx.dev/"> “Project IDX”</a> . its a best online tool for programmers to program your code online.</p><p><strong>Enquiries here</strong> : <a href="https://github.com/SJA0010">Github </a>, <a href="https://www.linkedin.com/in/subhan-abbasi-03b01b252">LinkedIn</a>, <a href="/service/mailto:MSJA010@gmail.com">Gmail</a>, <a href="https://wa.me/923317364550">whatsapp</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=478de4737492" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter Chatroom tips]]></title>
            <link>https://medium.com/@Subhan_Abbasi/flutter-chatroom-tips-03998f4a5061?source=rss-aeb18694b0e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/03998f4a5061</guid>
            <category><![CDATA[chatroom-tips]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[flutter-tips]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[dart]]></category>
            <dc:creator><![CDATA[Subhan Abbasi]]></dc:creator>
            <pubDate>Thu, 01 Aug 2024 18:06:46 GMT</pubDate>
            <atom:updated>2024-08-01T18:08:14.258Z</atom:updated>
            <content:encoded><![CDATA[<p>Implementing changes in UI with Flutter involves intricate details to ensure a seamless user experience (UX). Inspired by apps like WhatsApp, here’s a guide to building a high-quality chat feature. This structure makes your app responsive and captivating for users.</p><ol><li>Fixed App Bar and Message Bar</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/472/1*nML2C9njZ89ZGeguZsjGvQ.jpeg" /><figcaption>secreen structure</figcaption></figure><p>To create a fixed app bar and message bar, use the following sample code. You can customize the appBar and include your main code instead of ListView.builder. This basic structure helps to maintain a fixed position for the app bar and the message input field, enhancing the chat experience.</p><pre>Scaffold(<br>  appBar: AppBar(<br>    title: const Text(&quot;Chat&quot;),<br>    backgroundColor: const Color(0xFF007AFF),<br>  ),<br>  body: Column(<br>    children: [<br>      Expanded(<br>        child: ListView.separated(<br>          // Your code for the chat messages<br>        ),<br>      ),<br>      _BottomInputField(), // Your custom widget for the message input field<br>    ],<br>  ),<br>);</pre><p><strong>2. Aligning Chat Messages</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*OuOCOzguBw2gNA7BdlMCRA.jpeg" /></figure><p>To align chat messages to the top and avoid them piling up from the bottom, apply the following structure. This ensures messages appear from the top, providing a more natural chat flow.</p><pre>Align(<br>  alignment: Alignment.topCenter,<br>  child: ListView.separated(<br>    shrinkWrap: true,<br>    reverse: true,<br>    itemCount: chatList.length,<br>    itemBuilder: (context, index) {<br>      return Bubble(chat: chatList[index]); // Your custom chat bubble widget<br>    },<br>  ),<br>);</pre><p><strong>3. Handling Keyboard Appearance</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*qPtGZcl5Ur6pPlbnQSbYmQ.jpeg" /></figure><p>To ensure the message input bar does not get hidden behind the keyboard, wrap your Scaffold in a SingleChildScrollView and use resizeToAvoidBottomInset: true. This adjusts the UI when the keyboard appears, keeping the message bar accessible.</p><pre>Scaffold(<br>  appBar: AppBar(<br>    title: const Text(&quot;Chat&quot;),<br>    backgroundColor: const Color(0xFF007AFF),<br>  ),<br>  body: Column(<br>    children: [<br>      Expanded(<br>        child: ListView.separated(<br>          // Your code for the chat messages<br>        ),<br>      ),<br>      _BottomInputField(), // Your custom widget for the message input field<br>    ],<br>  ),<br>  resizeToAvoidBottomInset: true, // Ensures the message bar remains visible<br>);</pre><p>Building a chat feature in Flutter can be a rewarding experience, especially when you focus on creating a responsive and user-friendly interface. By implementing a fixed app bar and message bar, aligning chat messages to the top, and ensuring the message input bar remains visible when the keyboard appears, you can significantly enhance the user experience. These tips, inspired by popular apps like WhatsApp, will help you create a seamless and captivating chat feature in your Flutter app.</p><p>Remember, the key to a great chat interface lies in the details. Keep refining your code, testing different scenarios, and listening to user feedback. Happy coding, and may your Flutter app bring joy and convenience to its users!</p><p>If you found these tips helpful or have any questions, feel free to leave a comment below. Stay tuned for more Flutter tutorials and insights. Happy developing!</p><p><strong>note :</strong> if you don’t wanna install flutter in laptop, use<a href="https://idx.dev/"> “Project IDX”</a> . its a best online tool for programmers to program your code online.</p><p><strong>Enquiries here</strong> : <a href="https://github.com/SJA0010">Github </a>, <a href="https://www.linkedin.com/in/subhan-abbasi-03b01b252">LinkedIn</a>, <a href="/service/mailto:MSJA010@gmail.com">Gmail</a>, <a href="https://wa.me/923317364550">whatsapp</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=03998f4a5061" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to Flutter]]></title>
            <link>https://medium.com/@Subhan_Abbasi/introduction-to-flutter-5ba56c1e3b6b?source=rss-aeb18694b0e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/5ba56c1e3b6b</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[flutter-app-development]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Subhan Abbasi]]></dc:creator>
            <pubDate>Tue, 30 Jul 2024 18:38:47 GMT</pubDate>
            <atom:updated>2024-07-30T18:38:47.425Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>What is Flutter?</strong></p><p>What is Flutter It is an open-source UI toolkit created by Google for building natively compiled applications (mobile, web,) from a single codebase. It is a preferred choice for developers due to its high-performance rendering engine, flexible UI components and reactive programming model.</p><h4><strong>Why Choose Flutter?</strong></h4><p><strong>hybrid app : </strong>we can create app and web both on flutter</p><p><strong>Cross-Platform Development:</strong> Develop for iOS, Android, web, and desktop with a single codebase.</p><p><strong>Fast Development:</strong> Hot reload feature lets you see changes instantly without restarting the app.</p><p><strong>Beautiful UIs:</strong> Create stunning, expressive UIs with Flutter’s rich set of customizable widgets.</p><p><strong>Strong Community:</strong> Extensive documentation and a growing community provide plenty of resources and support.</p><h4>Understanding main.dart :</h4><p>if you have first day at flutter, dont worry, I’m here for you to make it easy to understand. lets start it from main.dart.</p><p>first erase all the un-necessary comments and delecting the code of default UI inside Scaffold()</p><pre>import &#39;package:flutter/material.dart&#39;;<br><br>void main() {<br>  runApp(MyApp());<br>}<br><br>class MyApp extends StatelessWidget {<br>  @override<br>  Widget build(BuildContext context) {<br>    return MaterialApp(<br>      home: Scaffold(<br>        appBar: AppBar(<br>          title: Text(&#39;Welcome to Flutter&#39;),<br>        ),<br>        body: Center(<br>          child: Text(&#39;Hello, world!&#39;),<br>        ),<br>      ),<br>    );<br>  }<br>}</pre><ul><li><strong>Imports:</strong> import &#39;package:flutter/material.dart&#39;; brings in the Flutter material package.</li><li><strong>Main Function:</strong> void main() { runApp(MyApp()); } launches the app.</li><li><strong>MyApp Class:</strong></li><li>Extends StatelessWidget, meaning it holds no state.</li><li>The build method returns a MaterialApp widget.</li><li>Inside MaterialApp, a Scaffold widget provides the basic structure with an AppBar and a body containing centered text.</li></ul><p><strong>note :</strong> if you don’t wanna install flutter in laptop, use<a href="https://idx.dev/"> “Project IDX”</a> . its a best online tool for programmers to program your code online.</p><p><strong>Enquiries here</strong> : <a href="https://github.com/SJA0010">Github </a>, <a href="https://www.linkedin.com/in/subhan-abbasi-03b01b252">LinkedIn</a>, <a href="/service/mailto:MSJA010@gmail.com">Gmail</a>, <a href="https://wa.me/923317364550">whatsapp</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5ba56c1e3b6b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>