<?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 Ahmed THARWAT on Medium]]></title>
        <description><![CDATA[Stories by Ahmed THARWAT on Medium]]></description>
        <link>https://medium.com/@at3541171?source=rss-5e56725a1c50------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*tHHO0mdtq659gWxXGVXxKA.jpeg</url>
            <title>Stories by Ahmed THARWAT on Medium</title>
            <link>https://medium.com/@at3541171?source=rss-5e56725a1c50------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 01:46:52 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@at3541171/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 Flutter Debug Modes in VS Code]]></title>
            <link>https://medium.com/@at3541171/mastering-flutter-debug-modes-in-vs-code-3966d7e2224b?source=rss-5e56725a1c50------2</link>
            <guid isPermaLink="false">https://medium.com/p/3966d7e2224b</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[performance-optimization]]></category>
            <category><![CDATA[debugging]]></category>
            <dc:creator><![CDATA[Ahmed THARWAT]]></dc:creator>
            <pubDate>Tue, 21 Jan 2025 14:15:52 GMT</pubDate>
            <atom:updated>2025-01-21T14:15:52.506Z</atom:updated>
            <content:encoded><![CDATA[<p>A Guide for Mid/Senior Developers<br>As Flutter developers, debugging efficiently is key to delivering high-quality applications. Flutter offers multiple debug modes, each serving a specific purpose. Understanding them can help us optimize app performance and streamline the development process. Let’s explore these modes in detail! 👇</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FobdUqh12jIhQ2bOAlOeOg.jpeg" /></figure><h3>1️⃣ Debug Mode (Default for flutter run)</h3><ul><li><strong>Purpose:</strong> Used during active development.</li><li><strong>Key Features:</strong></li><li>Enables <strong>hot reload</strong> for faster UI updates.</li><li>Provides <strong>extensive debugging tools</strong>, such as breakpoints, logging, and widget inspector.</li><li>Includes assertions for catching errors early.</li><li>Runs with minimal optimizations.</li><li><strong>Best for:</strong> UI development, state management testing, and debugging business logic.</li></ul><blockquote><strong>Command:<br></strong>flutter run — debug</blockquote><h3>2️⃣ Profile Mode</h3><ul><li><strong>Purpose:</strong> Used for performance testing.</li><li><strong>Key Features:</strong></li><li>Provides real-time performance profiling.</li><li>Disables hot reload to simulate production behavior.</li><li>Enables the Dart VM’s JIT compiler for performance insights.</li><li>Removes most debug overhead while keeping observability.</li><li><strong>Best for:</strong> Identifying UI jank, analyzing frame rendering, and optimizing app responsiveness.</li></ul><p><strong>Command:</strong></p><blockquote>flutter run — profile</blockquote><h3>3️⃣ Release Mode</h3><ul><li><strong>Purpose:</strong> Used for deploying production-ready apps.</li><li><strong>Key Features:</strong></li><li>Full AOT (Ahead-of-Time) compilation for best performance.</li><li>Strips out all debugging aids (e.g., assertions, debugging banners).</li><li>Produces a smaller app size with faster execution.</li><li>No observability or debugging tools.</li><li><strong>Best for:</strong> Publishing apps to the App Store/Play Store and final performance validation.</li></ul><p><strong>Command:#</strong></p><blockquote>flutter run — release</blockquote><h3>⚡ Pro Tips for Effective Debugging in VS Code:</h3><ul><li>Use the <strong>Flutter DevTools</strong> to monitor UI performance and memory usage.</li><li>Leverage <strong>breakpoints and watch variables</strong> to track state changes.</li><li>Utilize the <strong>flutter analyze</strong> command to catch potential issues early.</li><li>Test on real devices in profile/release modes for accurate performance insights</li></ul><p>Understanding when to use each mode will significantly enhance your development workflow and ensure you’re shipping efficient, high-performing Flutter apps.</p><p><strong>Which debug mode do you use the most in your workflow? Let me know in the comments! 👇</strong></p><p>#Flutter #MobileDevelopment #Debugging #Dart #PerformanceOptimization #CodingTips</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3966d7e2224b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter App Life Cycle]]></title>
            <link>https://medium.com/@at3541171/flutter-app-life-cycle-eadaed86972a?source=rss-5e56725a1c50------2</link>
            <guid isPermaLink="false">https://medium.com/p/eadaed86972a</guid>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[lifecycle]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Ahmed THARWAT]]></dc:creator>
            <pubDate>Sun, 29 Dec 2024 08:38:56 GMT</pubDate>
            <atom:updated>2024-12-29T08:38:56.255Z</atom:updated>
            <content:encoded><![CDATA[<p>The Flutter app lifecycle refers to the various stages an app goes through from launch to termination, including state management and handling various app events. Understanding the lifecycle of a Flutter app is crucial for managing resources efficiently, handling state, and implementing features such as background tasks and notifications.</p><p>تشير دورة حياة تطبيق Flutter إلى المراحل المختلفة التي يمر بها التطبيق من الإطلاق إلى الإنهاء، بما في ذلك إدارة الحالة والتعامل مع أحداث التطبيق المختلفة. يعد فهم دورة حياة تطبيق Flutter أمرًا بالغ الأهمية لإدارة الموارد بكفاءة والتعامل مع الحالة وتنفيذ ميزات مثل المهام الخلفية والإشعارات.</p><p><strong>Flutter app lifecycle steps:<br></strong>1<strong>.</strong>App Initialization (Launch Phase)<br> When a user launches the app, the Flutter engine initializes and starts running. The main() function is executed first, where the app’s root widget (usually a MaterialApp or CupertinoApp) is created and run.<br>عندما يقوم المستخدم بتشغيل التطبيق، يقوم محرك Flutter بالتهيئة ويبدأ في التشغيل. يتم تنفيذ الدالة main() أولاً، حيث يتم إنشاء أداة الجذر للتطبيق (عادةً MaterialApp أو CupertinoApp) وتشغيلها.</p><ul><li><strong>main() function</strong>: The entry point of the app where you initialize settings or services, such as analytics, Firebase, or any app-specific setup.</li><li><strong>App creation</strong>: The root widget (MaterialApp or CupertinoApp) is created, and Flutter initializes the UI framework.</li></ul><p>2.Widget Initialization<br>Once the root widget is set, Flutter will build the widget tree, and the StatefulWidget objects, if any<br>بمجرد تعيين الأداة الجذرية، سيقوم Flutter ببناء شجرة الأداة، وكائنات StatefulWidget، إن وجدت<br><strong>initState()</strong>:</p><ul><li>This is called when the widget is inserted into the widget tree (called only once).</li><li>It is used for initial setup, such as setting up listeners, subscriptions, or network requests.</li><li><strong>didChangeDependencies()</strong>:</li><li>Called immediately after initState() and whenever the widget&#39;s dependencies change.</li><li>Useful for setting up context-dependent values (like inherited widgets).</li></ul><p>3.Active Phase (Foreground)<br>While the app is running and visible to the user, it is considered in the active phase. During this time, Flutter handles state updates, UI rendering, and interaction events like taps, gestures, and animations.<br>بينما يكون التطبيق قيد التشغيل ومرئيًا للمستخدم، يتم اعتباره في المرحلة النشطة. خلال هذا الوقت، يتعامل Flutter مع تحديثات الحالة، وعرض واجهة المستخدم، وأحداث التفاعل مثل النقرات والإيماءات والرسوم المتحركة<br> <strong>State changes</strong>: Flutter reacts to user input and changes in data, triggering setState() and updating the UI.</p><ul><li><strong>Rendering</strong>: Widgets are rebuilt, and the framework ensures the UI stays in sync with the state.</li></ul><p>4.App Paused (Background Phase)<br>When the app goes into the background (e.g., the user presses the home button or switches to another app), it enters the paused state. Flutter provides lifecycle hooks for handling this state change.<br>عندما ينتقل التطبيق إلى الخلفية<br><strong>didChangeAppLifecycleState()</strong>:</p><ul><li>This method in the WidgetsBindingObserver allows you to detect when the app is paused (backgrounded).</li><li>You can perform actions like saving data or releasing resources when the app is no longer in the foreground.</li></ul><p>5.App Resumed (Foreground Phase)<br>When the app is brought back into the foreground (e.g., when the user returns to the app), it enters the resumed state.<br>عندما يتم إرجاع التطبيق إلى المقدمة ، فإنه يدخل في حالة الاستئناف.<br><strong>didChangeAppLifecycleState()</strong>:</p><ul><li>You can detect when the app returns to the foreground and resume tasks such as restarting animations, resuming network requests, or updating the UI.</li></ul><p>6.App Inactive<br>The app enters the inactive state in certain circumstances, such as when a phone call is received or the user interacts with system dialogs (e.g., the notification center or phone lock screen). During this phase, the app is still running but doesn’t receive input<br>عند تلقي مكالمة هاتفية أو تفاعل المستخدم مع مربعات حوار النظام (على سبيل المثال، مركز الإشعارات أو شاشة قفل الهاتف). خلال هذه المرحلة، لا يزال التطبيق قيد التشغيل ولكنه لا يتلقى أي إدخال<br>Flutter doesn’t provide a specific lifecycle callback for this state, but it is typically managed with lifecycle awareness methods like didChangeAppLifecycleState().<br>7.App Termination (Exit Phase)<br>When the app is terminated (either by the system or user), it enters the terminated state.<br>عندما يتم إنهاء التطبيق (إما بواسطة النظام أو المستخدم)، فإنه يدخل في حالة الإنهاء.<br><strong>dispose()</strong>:</p><ul><li>This is the last lifecycle method called for StatefulWidgets.</li><li>It’s used to clean up resources such as controllers, listeners, streams, etc., before the widget is destroyed</li><li><strong>System termination</strong>: In certain situations, the OS might terminate the app due to resource constraints (e.g., when the device is low on memory). Flutter does not provide a direct way to handle this, but developers should ensure proper resource management.</li></ul><p><strong>If you liked this article make sure to 👏 it below, and connect with me on </strong><a href="https://ahmedevcode.github.io/"><strong>Portfolio</strong></a><strong>, </strong><a href="https://github.com/ahmedevcode"><strong>Github</strong></a>,<a href="https://wa.me/qr/ZVM2BCD5GOD3C1"><strong>Whatsapp</strong></a>,<strong>and </strong><a href="https://www.linkedin.com/in/ahmed-elsharhawy-30a069180/"><strong>LinkedIn</strong></a><strong>.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eadaed86972a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ why dart Doesn’t support interface as a keyword?? ]]></title>
            <link>https://medium.com/@at3541171/why-dart-doesnt-support-interface-as-a-keyword-6174110e1ded?source=rss-5e56725a1c50------2</link>
            <guid isPermaLink="false">https://medium.com/p/6174110e1ded</guid>
            <category><![CDATA[abstract-class]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[interfaces]]></category>
            <dc:creator><![CDATA[Ahmed THARWAT]]></dc:creator>
            <pubDate>Wed, 25 Dec 2024 08:25:02 GMT</pubDate>
            <atom:updated>2024-12-25T08:25:02.018Z</atom:updated>
            <content:encoded><![CDATA[<p>📌 In Dart, there is no dedicated interface keyword like in some other languages such as Java. Instead, you can use abstract classes to achieve the same functionality.<br>في Dart، لا يوجد كلمة مفتاحية مخصصة لإنشاء واجهة (Interface) كما في لغات أخرى مثل Java. بدلاً من ذلك، يمكن استخدام الصفوف المجردة (Abstract Classes) لتحقيق نفس الوظيفة</p><p>1️⃣ How to Create an Interface Using Abstract Classes in Dart in figure 1<br>In Dart, interfaces are created by defining an abstract class that contains abstract methods. Any other class can implement this interface using the implements keyword.<br>ي Dart، يتم إنشاء واجهات عن طريق تعريف صف مجرد يحتوي على دوال غير معرفة (abstract methods). يمكن لأي صف آخر أن ينفذ هذه الواجهة باستخدام الكلمة المفتاحية implements.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/1*wgtx0srlY4dcongvDNu8Fg.png" /></figure><p>2️⃣ Implicit Interfaces in figure 2 ✨ <br>. Every class in Dart automatically defines an interface, even if it’s not explicitly declared as abstract<br> Any class can implement another class to use it as an interface.<br>. تحدد كل فئة في Dart واجهة تلقائيًا، حتى لو لم يتم إعلانها صراحةً على أنها مجردة<br>يمكن لأي فئة تنفيذ فئة أخرى لاستخدامها كواجهة</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/691/1*QxNjwidpXkPqX2V_BKxIBQ.png" /></figure><p><strong>Summary</strong></p><p>📌 every class generally in dart consider a interface ,does it job until writing abstract keyword.</p><p><strong>If you liked this article make sure to 👏 it below, and connect with me on </strong><a href="https://ahmedevcode.github.io/"><strong>Portfolio</strong></a><strong>, </strong><a href="https://github.com/ahmedevcode"><strong>Github</strong></a>,<a href="https://wa.me/qr/ZVM2BCD5GOD3C1"><strong>Whatsapp</strong></a>,<strong>and </strong><a href="https://www.linkedin.com/in/ahmed-elsharhawy-30a069180/"><strong>LinkedIn</strong></a><strong>.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6174110e1ded" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Avoiding Overtraining in AI: How It Affects Applications in Flutter ??]]></title>
            <link>https://medium.com/@at3541171/avoiding-overtraining-in-ai-how-it-affects-applications-in-flutter-bc3b31d1d028?source=rss-5e56725a1c50------2</link>
            <guid isPermaLink="false">https://medium.com/p/bc3b31d1d028</guid>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[gemini]]></category>
            <category><![CDATA[bard-ai]]></category>
            <category><![CDATA[overfitting]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Ahmed THARWAT]]></dc:creator>
            <pubDate>Mon, 23 Dec 2024 08:32:44 GMT</pubDate>
            <atom:updated>2024-12-23T08:32:44.614Z</atom:updated>
            <content:encoded><![CDATA[<h3>Avoiding Overtraining in AI: How It Affects Applications in Flutter ??</h3><p>Overfitting in flutter</p><p>hello everyone 🙋<br> :السلام عليكم ورحمه الله وبركاته <br>المشكلة: الإفراط في التدريب (Overfitting)<br>في تطوير تطبيقات Flutter، السعي نحو الكمال في التصميم والأداء أمر طبيعي، لكن المبالغة قد تؤدي إلى نتائج عكسية. في نماذج الذكاء الاصطناعي التي يمكن استخدامها مع Flutter (مثل نماذج التعرف على الصور أو التوصيات)، يحدث الإفراط في التدريب عندما يتعلم النموذج تفاصيل غير مفيدة أو ضوضاء من البيانات التدريبية. نتيجة لذلك، يتفوق النموذج على بيانات التدريب ولكنه يفشل في التعميم على بيانات جديدة.</p><p>الحل: تقنيات منع الإفراط في التدريب في تطبيقات Flutter<br>للحفاظ على التوازن بين الأداء والتعميم في تطبيقات Flutter التي تعتمد على الذكاء الاصطناعي، يمكن استخدام هذه التقنيات:</p><p>1️⃣ التحقق من صحة النموذج<br>مجموعة التحقق من الصحة (Validation Set):<br>تأكد من فصل جزء من البيانات التدريبية لتقييم أداء النموذج أثناء التدريب، تمامًا كما تختبر واجهات المستخدم (UI) على أجهزة متعددة.<br>التوقف المبكر (Early Stopping):<br>أوقف التدريب إذا لاحظت أن أداء النموذج على مجموعة التحقق بدأ في التدهور، كما تتوقف عن إضافة ميزات غير ضرورية عند اختبار واجهة Flutter.<br>2️⃣ تنظيم البيانات (Data Regularization)<br>زيادة حجم البيانات (Data Augmentation):<br>إذا كنت تعمل على تطبيق Flutter مع ميزات مثل التعرف على الصور، قم بزيادة حجم البيانات باستخدام تقنيات مثل تدوير الصور أو تغيير الإضاءة.<br>تنظيف البيانات:<br>تأكد من إزالة البيانات غير المتسقة أو الشاذة لضمان نتائج أكثر دقة، تمامًا كما تتجنب الأخطاء في الكود.<br>3️⃣ تعديل بنية النموذج<br>تبسيط النموذج:<br>استخدم بنية نموذج بسيطة بما يكفي لتحسين الأداء على الأجهزة ذات الموارد المحدودة، مثل الهواتف القديمة.<br>تقنيات التنظيم (Regularization):<br>استخدم تقنيات مثل Dropout لتقليل الإفراط في التدريب، كما تقلل من استخدام الرسوم المتحركة المفرطة لتحسين الأداء.<br>4️⃣ ضبط معدل التعلم (Learning Rate)<br>معدل تعلم متكيف:<br>استخدم أدوات مثل Adam أو RMSprop لتعديل معدل التعلم تلقائيًا، مشابهة لكيفية تعديل الرسوم المتحركة بناءً على أداء التطبيق.</p><p>📌 خلاصة:<br>عند دمج نماذج الذكاء الاصطناعي مع تطبيقات Flutter، يجب تحقيق توازن بين الأداء والتعميم. استخدم تقنيات التحقق من الصحة، وتنظيم البيانات، وتعديل بنية النموذج، وضبط معدل التعلم لتحسين تجربة المستخدم وجعل تطبيقك أكثر تميزًا.<br><a href="https://www.linkedin.com/feed/hashtag/?keywords=flutter&amp;highlightedUpdateUrns=urn%3Ali%3Aactivity%3A7276876373917388800">#flutter</a> <a href="https://www.linkedin.com/feed/hashtag/?keywords=chatgpt&amp;highlightedUpdateUrns=urn%3Ali%3Aactivity%3A7276876373917388800">#chatGpt</a><br><a href="https://www.linkedin.com/feed/hashtag/?keywords=ai&amp;highlightedUpdateUrns=urn%3Ali%3Aactivity%3A7276876373917388800">#Ai</a><br><a href="https://www.linkedin.com/feed/hashtag/?keywords=gemini&amp;highlightedUpdateUrns=urn%3Ali%3Aactivity%3A7276876373917388800&amp;lipi=urn%3Ali%3Apage%3Ad_flagship3_detail_base%3BOHiF1OUlRpCbDR6RMbeXpA%3D%3D">#gemini</a> <br><a href="https://www.linkedin.com/feed/hashtag/?keywords=bard&amp;highlightedUpdateUrns=urn%3Ali%3Aactivity%3A7276876373917388800">#bard</a><br><a href="https://www.linkedin.com/feed/hashtag/?keywords=dart&amp;highlightedUpdateUrns=urn%3Ali%3Aactivity%3A7276876373917388800">#dart</a><br><a href="https://www.linkedin.com/feed/hashtag/?keywords=learn&amp;highlightedUpdateUrns=urn%3Ali%3Aactivity%3A7276876373917388800">#learn</a> <br><a href="https://www.linkedin.com/feed/hashtag/?keywords=read&amp;highlightedUpdateUrns=urn%3Ali%3Aactivity%3A7276876373917388800">#Read</a> <br><a href="https://www.linkedin.com/feed/hashtag/?keywords=manuel&amp;highlightedUpdateUrns=urn%3Ali%3Aactivity%3A7276876373917388800">#Manuel</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bc3b31d1d028" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How do constraints determine the child widget’s size?]]></title>
            <link>https://medium.com/@at3541171/how-do-constraints-determine-the-child-widgets-size-5ba2bf710d8c?source=rss-5e56725a1c50------2</link>
            <guid isPermaLink="false">https://medium.com/p/5ba2bf710d8c</guid>
            <category><![CDATA[constraints]]></category>
            <category><![CDATA[widget]]></category>
            <category><![CDATA[renderobject]]></category>
            <category><![CDATA[book-review]]></category>
            <dc:creator><![CDATA[Ahmed THARWAT]]></dc:creator>
            <pubDate>Thu, 19 Dec 2024 08:11:26 GMT</pubDate>
            <atom:updated>2024-12-19T08:11:26.640Z</atom:updated>
            <content:encoded><![CDATA[<p>The Flutter layout algorithm can be summarized as follows:<br>📌”Constraints go down. Sizes go up. Parent sets the position”</p><p>This easy and catchy rule describes the three key steps that are needed to position and lay out any widget.</p><p>Let’s break it down in more detail:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*9oL3Tg8Gaxwehj5YCkMqXw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*9oL3Tg8Gaxwehj5YCkMqXw.png" /></figure><p>1️⃣ Constraints go down: A widget gets its own constraints from its parent.<br> This widget also passes new constraints to its children one by one (these can be different for each child). This process walks down the entire render tree until it reaches the last child. Once every Render Object has constraints, the next step is to define the actual size.<br>2️⃣ Sizes go up: The child picks a size that satisfies the constraints received by the parent. The sizing algorithm is defined by each RenderObject depending on their own needs. In this step,together with step 3, the framework walks back up the render tree passing the defined geometry.<br>4️⃣ Parent sets the position: Once all children have had their size defined, the parent will position its children (horizontally on the x axis and vertically on the y axis) one by one. Once all children have<br>been positioned, the parent will move to step 2 again until we reach the Render Object root.</p><p>📉This can be visualized with the following diagram below:</p><p>constraints 🆚 sizes</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/811/1*ZeMXe7UjdRryB2WUbINK4g.png" /></figure><p>Figure 2.1 — Constraints going down from the parent to its children<br>and sizes going up from the children to the parent</p><p>In the diagram, you can see that the constraints are passed all the way down from the root to the leaf<br>nodes of the render object tree. Then the sizes are passed all the way up from the leaf nodes to the<br>root. This also demonstrates the efficiency of Flutter’s layout algorithm: the layout process is a single- pass process. This means that the render tree is walked at most once in each direction: down to pass<br>constraints ⬇️ and up to pass sizes ⬆️ . Now let’s look at some specific examples.<br>Just reading part of chapter 2 Flutter Design Patterns and Best Practices by <a href="https://www.linkedin.com/in/daria-orlova-47a44110a/">Daria Orlova</a> , <a href="https://www.linkedin.com/in/esrakadah/">Esra Kadah</a> and <a href="https://www.linkedin.com/in/jaimeblascoandres/">Jaime B.</a> and I must say, it’s a goldmine for any Flutter developer! 💘</p><p><strong>reference:<br></strong><a href="https://lnkd.in/d6ZBVPut">https://lnkd.in/d6ZBVPut</a><br><a href="https://lnkd.in/dSR47VcB">https://lnkd.in/dSR47VcB</a><br><a href="https://www.linkedin.com/feed/hashtag/?keywords=flutter_design_patterns_and_best_practise&amp;highlightedUpdateUrns=urn%3Ali%3Aactivity%3A7275419985370304512">hashtag#Flutter_Design_Patterns_and_Best_Practise</a></p><p><a href="https://www.linkedin.com/feed/hashtag/?keywords=flutter_design_patterns_and_best_practise&amp;highlightedUpdateUrns=urn%3Ali%3Aactivity%3A7275419985370304512">#Flutter_Design_Patterns_and_Best_Practise</a> <br><a href="https://www.linkedin.com/feed/hashtag/?keywords=chapter2&amp;highlightedUpdateUrns=urn%3Ali%3Aactivity%3A7275419985370304512">#chapter2</a><br><a href="https://www.linkedin.com/feed/hashtag/?keywords=flutter&amp;highlightedUpdateUrns=urn%3Ali%3Aactivity%3A7275419985370304512">#flutter</a><br><a href="https://www.linkedin.com/feed/hashtag/?keywords=constraints&amp;highlightedUpdateUrns=urn%3Ali%3Aactivity%3A7275419985370304512">#constraints</a> <br><a href="https://www.linkedin.com/feed/hashtag/?keywords=widgets&amp;highlightedUpdateUrns=urn%3Ali%3Aactivity%3A7275419985370304512">#widgets</a><br><a href="https://www.linkedin.com/feed/hashtag/?keywords=container&amp;highlightedUpdateUrns=urn%3Ali%3Aactivity%3A7275419985370304512">#container</a><br><a href="https://www.linkedin.com/feed/hashtag/?keywords=renderobject&amp;highlightedUpdateUrns=urn%3Ali%3Aactivity%3A7275419985370304512">#RenderObject</a> <br><a href="https://www.linkedin.com/feed/hashtag/?keywords=sizes&amp;highlightedUpdateUrns=urn%3Ali%3Aactivity%3A7275419985370304512">#sizes</a><br><a href="https://www.linkedin.com/feed/hashtag/?keywords=complexproblems&amp;highlightedUpdateUrns=urn%3Ali%3Aactivity%3A7275419985370304512">#complexproblems</a> <br><a href="https://www.linkedin.com/feed/hashtag/?keywords=flutterdeveloper&amp;highlightedUpdateUrns=urn%3Ali%3Aactivity%3A7275419985370304512">#flutterdeveloper</a> <br><a href="https://www.linkedin.com/feed/hashtag/?keywords=dartprogramming&amp;highlightedUpdateUrns=urn%3Ali%3Aactivity%3A7275419985370304512">#dartprogramming</a> <br><a href="https://www.linkedin.com/feed/hashtag/?keywords=bookreview&amp;highlightedUpdateUrns=urn%3Ali%3Aactivity%3A7275419985370304512">#bookreview</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5ba2bf710d8c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Wireless Debugging with out using USB]]></title>
            <link>https://medium.com/@at3541171/wireless-debugging-with-out-using-usb-9033e152c0cc?source=rss-5e56725a1c50------2</link>
            <guid isPermaLink="false">https://medium.com/p/9033e152c0cc</guid>
            <category><![CDATA[wireless-debugging]]></category>
            <category><![CDATA[androiddebugging]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[debugging]]></category>
            <category><![CDATA[wireless]]></category>
            <dc:creator><![CDATA[Ahmed THARWAT]]></dc:creator>
            <pubDate>Wed, 13 Nov 2024 07:06:13 GMT</pubDate>
            <atom:updated>2024-11-13T07:06:13.048Z</atom:updated>
            <content:encoded><![CDATA[<p>عاوز تفعل التصحيح اللاسلكي (Wireless Debugging)<br>بدون كابل USB في ال vs code</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E3Fl-0q4ppo9xjp8ZIR0cg.png" /></figure><blockquote>لما تطور تطبيقات فلاتر او اندرويد ، ممكن تقابلك مشكلة الاتصال اللاسلكي بجهازك للتصحيح<br>لما تطوير تطبيقات Flutter أو Android (Debugging) من غير كابل USB لل Android. دي الخطوات اللي نجحت معايا وساعدتني في حل المشكلة بسهولة</blockquote><h3>📌 الخطوات:</h3><p>توصيل الهاتف بالكمبيوتر عبر كابل USB (أول مرة بس).<br>تفعيل USB Debugging في إعدادات المطور.<br>هتفعل وضع اتصال USB إلى “الشحن فقط” (Charge Only)، ولازم تعمل دي لأنه ممكن تقابلك مشكلة وميرداش يتصل ودي من نفس مكان تفعيل ال USB Debugging من Developer options.استخدم باكج Android ADB WLAN<br>ابحث عن الباكج دي في الاكستنشل</p><h3>Usage</h3><ol><li>Connect the USB (Android 11+ both USB and Wireless).</li><li>Make sure that your mobile and PC on the same WLAN.</li><li>Active extension.</li></ol><ul><li>Using icon button upper right ⭐</li><li>Using command ctrl + shift + p ;</li><li>press on Android ADB WLAN connect then enter your phone address as 198.168.1.1 <br>you will find it in wi-fi settings in your connection in wireless</li><li>connect phonw with usb only for first one ,you don’t need to use usb again .</li><li>Remove USB.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8jMl3YR7AN1UFVj24WQtzQ.jpeg" /></figure><p>finally you connect successfully <br>Enjoy !</p><h3>Features</h3><ol><li>Debug through wireless.</li><li>Supports simultaneous connection of multiple devices.</li></ol><h3>reference</h3><p><a href="https://marketplace.visualstudio.com/items?itemName=HanWang.android-adb-wlan">Android ADB WLAN — Visual Studio Marketplace</a></p><p><strong>If you liked this article make sure to 👏 it below, and connect with me on </strong><a href="https://ahmedevcode.github.io/"><strong>Portfolio</strong></a><strong>, </strong><a href="https://github.com/ahmedevcode"><strong>Github</strong></a>,<a href="https://wa.me/qr/ZVM2BCD5GOD3C1"><strong>Whatsapp</strong></a>,<strong>and </strong><a href="https://www.linkedin.com/in/ahmed-elsharhawy-30a069180/"><strong>LinkedIn</strong></a><strong>.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9033e152c0cc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Obfuscation in Flutter and Dart code]]></title>
            <link>https://medium.com/@at3541171/obfuscation-in-flutter-and-dart-code-2df81236c419?source=rss-5e56725a1c50------2</link>
            <guid isPermaLink="false">https://medium.com/p/2df81236c419</guid>
            <category><![CDATA[mysterious]]></category>
            <category><![CDATA[obfuscation]]></category>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Ahmed THARWAT]]></dc:creator>
            <pubDate>Tue, 12 Nov 2024 04:42:27 GMT</pubDate>
            <atom:updated>2024-11-12T04:42:27.055Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello, in this article you will learn how to do Flutter and Dart Obfuscation, one of the most important topics of Flutter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*iLIHUx9ubNcJPPEf-CWvWw.png" /><figcaption>Obfuscation process</figcaption></figure><h3>What is code obfuscation?</h3><p>Code obfuscation is the process of modifying an app’s binary to make it harder for humans to understand. Obfuscation hides function and class names in your compiled Dart code, replacing each symbol with another symbol, making it difficult for an attacker to reverse engineer your proprietary app.</p><h3><strong>Why Obfuscation?</strong></h3><ul><li>Security: By making the code unreadable, it makes it difficult for malicious users to understand and misuse the code.</li><li>Intellectual Property: Secures your intellectual property by protecting the code.</li><li>Size Reduction: In some cases, obfuscation can also reduce the size of the code.</li></ul><h3>Strategies for Flutter Obfuscation:</h3><ol><li>Renaming Identifiers: The most common obfuscation technique is to rename classes, methods, variables, and other identifiers to obscure names that have no semantic meaning. This makes the code more challenging to understand for potential attackers.</li><li>Control Flow Obfuscation: This technique modifies the control flow of the code, making it harder to follow and analyze. It includes techniques like adding dummy code, changing the order of statements, and introducing conditional jumps to confuse reverse-engineering attempts.</li><li>String Encryption: Encrypting sensitive strings, such as URLs, API endpoints, or encryption keys, can prevent attackers from easily extracting or understanding their purpose.</li><li>Code Splitting: Dividing your code into smaller modules or libraries can make it harder for attackers to comprehend the overall architecture and logic of your app.</li><li>Asset Encryption: If your app contains sensitive or proprietary assets like images, videos, or audio files, consider encrypting them to prevent unauthorized access or usage.</li></ol><p>Let’s get started 🥷🏻</p><h3><strong>how to use obfuscation in your project</strong></h3><p><strong>1.Create a flutter project.</strong></p><pre>flutter create my_app<br>cd my_app</pre><p><strong>2. Structure the Project<br></strong>Flutter’s code obfuscation works only on a release build.<strong><br></strong>To enable obfuscation, we need to add some additional parameters to the flutter build commands. Let’s see how we can do obfuscation for both Android and iOS.</p><p><strong><em>for Android;</em></strong></p><ul><li>Open theandroid/app/build.gradlefile.</li><li>In the buildTypes section, update the release configuration as follows:</li></ul><pre>android {<br>    ...<br>    buildTypes {<br>        release {<br>            ...<br>            minifyEnabled true<br>            shrinkResources true<br>            proguardFiles getDefaultProguardFile(&#39;proguard-android-optimize.txt&#39;), &#39;proguard-rules.pro&#39;<br>        }<br>    }<br>}</pre><ul><li>To specify Proguard rules, create the file android/app/proguard-rules.pro and add the following lines:</li></ul><pre># Flutter Obfuscation<br>-ignorewarnings<br>-keep class io.flutter.app.** { *; }<br>-keep class io.flutter.plugin.** { *; }<br>-keep class io.flutter.util.** { *; }<br>-keep class io.flutter.view.** { *; }<br>-keep class io.flutter.embedding.** { *; }<br>-keep class io.flutter.embedding.engine.** { *; }<br>-keep class io.flutter.embedding.android.** { *; }<br>-keep class io.flutter.embedding.engine.plugins.** { *; }<br>-keep class io.flutter.plugin.common.** { *; }<br>-keep class io.flutter.plugin.platform.** { *; }</pre><p><strong><em>for iOS;</em></strong></p><ul><li>Open theios/Runner.xcodeproj file.</li><li>In the Build Settings section, find the Other Swift Flags setting and add -D DART_OBFUSCATION.</li></ul><p><strong>3. Compiling the Application with Obfuscation</strong></p><p>Use the following commands to create an obfuscated build for Android and iOS:</p><p><strong>Android;</strong></p><pre>flutter build apk --release --obfuscate --split-debug-info=./build_info</pre><p><strong>iOS;</strong></p><pre>flutter build ios --release --obfuscate --split-debug-info=./build_info</pre><p>These commands put the debug information files of the obfuscated code in the specified directory. These files are important for debugging and resolving crash reports.</p><p><strong>4. Reviewing Application Files</strong></p><p>You can check whether the code is hidden by opening the APK or IPA file created as a result of the obfuscation process. To examine Android APK files apktool or similar tools can be used. For iOS IPA files, tools such as class-dump or otool can be used.</p><ul><li>Review Android APK File:<br>Decompile the APK file with apktool.</li></ul><pre>apktool d my_app.apk -o output_dir</pre><ul><li>Examine the iOS IPA file:<br>Open the IPA file and extract the application file in the Payload directory. Examine the application file with class-dump or otool.</li></ul><pre>class-dump -H MyApp -o output_dir</pre><h3>Limitations</h3><p>Note that obfuscating your code does <em>not</em> encrypt resources nor does it protect against reverse engineering. It only renames symbols with more obscure names.</p><h3>References</h3><p><a href="https://docs.flutter.dev/deployment/obfuscate">https://docs.flutter.dev/deployment/obfuscate</a><br>Thanks for reading!<br>See you in new articles 💙</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/88/1*bVHlwhBuYRc1T_G9unyG3A@2x.png" /></figure><p><strong>If you liked this article make sure to 👏 it below, and connect with me on </strong><a href="https://ahmedevcode.github.io/"><strong>Portfolio</strong></a><strong>, </strong><a href="https://github.com/ahmedevcode"><strong>Github</strong></a>,<a href="https://wa.me/qr/ZVM2BCD5GOD3C1"><strong>Whatsapp</strong></a>,<strong>and </strong><a href="https://www.linkedin.com/in/ahmed-elsharhawy-30a069180/"><strong>LinkedIn</strong></a><strong>.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2df81236c419" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Factory design pattern]]></title>
            <link>https://medium.com/@at3541171/factory-design-pattern-bda5f69deea0?source=rss-5e56725a1c50------2</link>
            <guid isPermaLink="false">https://medium.com/p/bda5f69deea0</guid>
            <category><![CDATA[factory]]></category>
            <category><![CDATA[design-patterns]]></category>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[factory-method-pattern]]></category>
            <dc:creator><![CDATA[Ahmed THARWAT]]></dc:creator>
            <pubDate>Sun, 27 Oct 2024 08:54:19 GMT</pubDate>
            <atom:updated>2024-10-27T08:56:32.711Z</atom:updated>
            <content:encoded><![CDATA[<p>Factory design pattern</p><p>there are three kinds of factories 1. Simple Factory 2.Factory Methods 3. Abstract Factory</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0SN3A-muGfQgdIEC6kDZ5w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*xnGKLyw1Y4Vye3fvhLhX-Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1002/1*W0KHSy_cXt1mOO5G1VTbOQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*meFBw6zcy43ZSaLxVtIOlQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ex93jkAIY4CztZCt1luqaw.png" /></figure><p>the First Factory kind is not consider a pattern .it,is a proxcy</p><p>i will talk about a second kind Factory Methods</p><p>what is the benefit of use factory methods ??</p><blockquote>Factory method is a very important design pattern in object oriented designs. The main goal of this pattern is to allow the client to create objects without having to specify the details of the objects to create. It returns one of several possible classes that share a common super class.</blockquote><p>نتخيل اننا عندنا مطعم المطعم ده بيبيع ساندوتشات</p><p>كل ساندوتش ليه اسم مختلف او مكونات مختلفه لكن في بينهم رابط مشترك كل نوع عنده اسم وعدد سعرات حراريه مختلفه ولكن بيحتاجوا نفس نوع الخبز .</p><p>#headFirstdesignpattern</p><p>#FactoryMethods</p><p>#science</p><p>#dart</p><p>نُشر أولا في منصة #قبيلة</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bda5f69deea0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>