<?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 Juzuli M P on Medium]]></title>
        <description><![CDATA[Stories by Juzuli M P on Medium]]></description>
        <link>https://medium.com/@juzuli?source=rss-f15b27476fb0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Y6QW20xRJKE_47_Jln89Yg.jpeg</url>
            <title>Stories by Juzuli M P on Medium</title>
            <link>https://medium.com/@juzuli?source=rss-f15b27476fb0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 19:47:59 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@juzuli/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[How to Find Unused Files in a Flutter Project (Without Guessing)]]></title>
            <link>https://juzuli.medium.com/how-to-find-unused-files-in-a-flutter-project-without-guessing-9a7728ef2d51?source=rss-f15b27476fb0------2</link>
            <guid isPermaLink="false">https://medium.com/p/9a7728ef2d51</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[flutter-app-development]]></category>
            <category><![CDATA[best-practices]]></category>
            <category><![CDATA[flutter-widget]]></category>
            <dc:creator><![CDATA[Juzuli M P]]></dc:creator>
            <pubDate>Tue, 21 Apr 2026 08:28:34 GMT</pubDate>
            <atom:updated>2026-04-21T08:28:34.037Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/937/1*63RbmVkq1rkA7N5Uh8C5aw.png" /></figure><p>At some point in every Flutter project, you stop deleting files — not because they’re needed, but because you’re not sure what might break.</p><p>That hesitation is a signal: your codebase has grown beyond manual tracking.</p><p>Instead of guessing, you can use a file usage audit to identify what’s <em>actually</em> being used — and what probably isn’t.</p><h3>The Real Problem</h3><p>In medium to large Flutter projects, unused files tend to accumulate because:</p><ul><li>No one is fully confident about dependencies</li><li>Old features leave behind dead code</li><li>Refactoring avoids deletion to “play it safe.”</li><li>New contributors don’t know what’s safe to remove</li></ul><p>Over time, this leads to:</p><ul><li>Noisy and cluttered folders</li><li>Slower navigation and onboarding</li><li>Increased risk during refactoring</li><li>General hesitation to clean anything</li></ul><p>The longer this continues, the worse it gets.</p><h3>What file_usage_audit Actually Does</h3><p>The file_usage_audit tool scans your Flutter project and analyzes how files are connected through imports.</p><p>At a high level, it:</p><ul><li>Builds a dependency graph from Dart imports</li><li>Identifies files that are <strong>not referenced anywhere</strong></li><li>Flags them as <em>likely unused</em></li></ul><p>This gives you a starting point for cleanup — based on actual structure, not assumptions.</p><h3>How to Use file_usage_audit</h3><p>Package: <a href="https://pub.dev/packages/file_usage_audit">file_usage_audit on pub.dev</a></p><p>Install globally:</p><pre>dart pub global activate file_usage_audit</pre><p>Run from your project root (where pubspec.yaml exists):</p><pre>dart pub global run file_usage_audit:file_usage_audit --verbose</pre><p>Useful options:</p><pre>file_usage_audit - verbose<br>file_usage_audit - include-tests<br>file_usage_audit - assets<br>file_usage_audit - assets-only</pre><h3>Example Output (What to Expect)</h3><p>A typical output might look like:</p><pre>Lib Dart files: 975<br>Reachable from main (+ --entry): 973<br>Dead (not reachable from main): 2<br>  Islands (has lib inbound; weakly connected among those): 0 files in 0 groups<br>  Stray (no lib inbound): 2<br><br>--- Reachable from main (sorted) ---<br>lib/core/application/app_state_bloc.dart<br>lib/core/application/app_state_bloc.freezed.dart<br>...<br><br>--- Stray (no other lib file imports this; may be test-only / new / miswired) ---<br>lib/features/home/presentation/pages/categories_page.dart<br>lib/firebase_options.dart</pre><p>This does <strong>not</strong> mean these files are safe to delete immediately.</p><p>It means:</p><blockquote><em>“These files are not referenced through imports anywhere in your project.”</em></blockquote><p>That’s a strong signal — but not absolute proof.</p><h3>Important Limitations (Don’t Skip This)</h3><p>This tool is helpful, but it is <strong>not foolproof</strong>. If you ignore this section, you <em>will</em> break something.</p><p>It may miss usage in cases like:</p><ul><li>Dynamic imports or runtime references</li><li>Reflection or code generation</li><li>Routes referenced via strings</li><li>Assets used indirectly (e.g., via config or JSON)</li></ul><p>Because of this, the output should be treated as:</p><blockquote><strong><em>Candidates for review — not guaranteed dead code</em></strong></blockquote><h3>Suggested Safe Workflow</h3><p>A practical way to use this tool without breaking your app:</p><ol><li>Run the audit</li><li>Review flagged files one by one</li><li>Search the project manually for indirect usage</li><li>Delete in small batches (not everything at once)</li><li>Run tests and build after each batch</li></ol><p>This minimizes risk while still making steady progress.</p><h3>Alternatives (and Why They Fall Short)</h3><p>You can try:</p><ul><li>IDE warnings (limited scope)</li><li>Manual search (grep, global search)</li><li>Relying on memory or team knowledge</li></ul><p>All of these break down as the project grows.</p><p>A usage audit tool works because it analyzes the <strong>entire dependency graph</strong>, not just what’s obvious.</p><h3>Final Takeaway</h3><p>If you’re deleting files in a Flutter project without a usage audit, you’re guessing.</p><p>Tools like file_usage_audit don’t eliminate risk—but they reduce it enough to make cleanup practical.</p><p>And in a growing codebase, that difference matters.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9a7728ef2d51" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[FlutterGen: The Unsung Hero of Flutter Asset Management]]></title>
            <link>https://juzuli.medium.com/fluttergen-the-unsung-hero-of-flutter-asset-management-be4a45fb1832?source=rss-f15b27476fb0------2</link>
            <guid isPermaLink="false">https://medium.com/p/be4a45fb1832</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[flutter-widget]]></category>
            <category><![CDATA[flutter-app-development]]></category>
            <category><![CDATA[flutter-ui]]></category>
            <category><![CDATA[asset-management]]></category>
            <dc:creator><![CDATA[Juzuli M P]]></dc:creator>
            <pubDate>Wed, 17 Jul 2024 07:35:41 GMT</pubDate>
            <atom:updated>2024-07-17T09:49:27.369Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ph5wnE3yehiJDUUQnWT1_Q.png" /></figure><h3>The Asset Apocalypse</h3><p>Picture this: It’s 3 AM, your eyes are bloodshot, and you’re knee-deep in a Flutter project. Suddenly, you realize you’ve misspelled an asset path for the umpteenth time. Sound familiar? We’ve all been there, fighting the good fight against string-based asset management. But what if I told you there’s a better way?</p><h3>Enter FlutterGen: Your New Best Friend</h3><p>Meet <a href="https://pub.dev/packages/flutter_gen">FlutterGen</a>, the superhero of the Flutter world that nobody’s talking about (yet). It’s here to save you from the perils of typos, the tedium of refactoring, and the general headache of managing your assets. But how does it work its magic? Let’s dive in!</p><p><a href="https://pub.dev/packages/flutter_gen">flutter_gen | Dart package</a></p><h3>The Origin Story: Why FlutterGen?</h3><p>Remember the days of manually typing out asset paths?</p><pre>Image.asset(&#39;assets/images/my_cool_image.png&#39;)</pre><p>One misplaced letter, and boom! Your app crashes faster than you can say “hot reload”. FlutterGen is the answer to our collective prayers, turning this:</p><pre>Image.asset(&#39;assets/images/my_cool_image.png&#39;)</pre><p>Into this beauty:</p><pre>Image.asset(Assets.images.myCoolImage.path)</pre><p>Autocomplete, type-safety, and refactoring support? Yes, please!</p><h3>Joining Forces with FlutterGen</h3><h3>The Initiation Ritual (aka Installation)</h3><p>First things first, let’s get FlutterGen on your team. You have two paths to choose from:</p><ol><li>The Brew Crew (for macOS and Linux aficionados):</li></ol><pre>brew install FlutterGen/tap/fluttergen</pre><p>2. The Pub Club (for everyone, including Windows users):</p><pre>dart pub global activate flutter_gen</pre><p>Choose your fighter! (But remember, Pub Club members might need to tweak their PATH. It’s like an exclusive VIP area.)</p><h3>The Sacred Scroll (pubspec.yaml)</h3><p>Now, let’s update the ancient texts (aka your pubspec.yaml):</p><pre>dev_dependencies:<br>  flutter_gen_runner: ^5.6.0<br><br>flutter_gen:<br>  output: lib/gen/<br>  integrations:<br>    flutter_svg: true<br>flutter:<br>  assets:<br>    - assets/icons/<br>    - assets/images/</pre><p>This is like giving FlutterGen a map of your asset treasure trove.</p><h3>The Summoning</h3><p>With everything in place, it’s time to summon FlutterGen’s power:</p><pre>fluttergen</pre><p>Watch in awe as it generates assets.gen.dart and fonts.gen.dart. These are your new spellbooks, filled with type-safe incantations to summon any asset at will.</p><h3>The FlutterGen Lifestyle</h3><h3>Asset Organization: A Place for Everything</h3><p>FlutterGen works best when your assets are organized. Here’s a winning strategy:</p><pre>assets/<br>├── icons/<br>│   └── ... (SVGs, PNGs, your choice!)<br>├── images/<br>│   └── ... (The more, the merrier)<br>└── translations/<br>    └── ... (For your polyglot app)</pre><h3>Wielding Your New Powers</h3><p>Now, feast your eyes on this:</p><pre>// Summoning images<br>Image.asset(Assets.images.sampleImage.path)<br><br>// Conjuring SVG icons<br>SvgPicture.asset(Assets.icons.sampleLogo)</pre><p>No more string literals. No more typos. Just pure, type-safe asset goodness.</p><h3>The FlutterGen Code of Conduct</h3><ol><li>Always use the Assets class. It&#39;s there for a reason!</li><li>Keep your assets folder tidy. A clean assets folder is a happy assets folder.</li><li>Name your files descriptively. Future you will thank present you.</li><li>Run fluttergen after adding new assets. It&#39;s like brushing your teeth - do it regularly!</li><li>Commit those generated files. Share the love (and type-safety) with your team.</li></ol><h3>Troubleshooting: When Things Go South</h3><p>Even superheroes have bad days. If FlutterGen seems to be taking a coffee break:</p><ol><li>Double-check your pubspec.yaml. It&#39;s like FlutterGen&#39;s GPS - it needs to be accurate.</li><li>Try the old “turn it off and on again” trick: flutter clean followed by flutter pub get.</li><li>When in doubt, check the <a href="https://pub.dev/packages/flutter_gen">FlutterGen docs</a>. They’re like the superhero hotline.</li></ol><h3>The Joyful Conclusion</h3><p>Congratulations! You’ve now joined the elite ranks of Flutter developers who have seen the light. Gone are the days of string-based asset management. Welcome to the bright, type-safe future with FlutterGen.</p><p>Remember, with great power comes great responsibility. Use FlutterGen wisely, and may your builds be ever in your favor!</p><p>Now go forth, and may your assets always be found, your paths always be correct, and your Flutter projects always compile on the first try!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=be4a45fb1832" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter Localization: A Developer’s Journey with easy_localization]]></title>
            <link>https://juzuli.medium.com/flutter-localization-a-developers-journey-with-easy-localization-ebf5d93b871a?source=rss-f15b27476fb0------2</link>
            <guid isPermaLink="false">https://medium.com/p/ebf5d93b871a</guid>
            <category><![CDATA[flutter-localization]]></category>
            <category><![CDATA[easy-localization]]></category>
            <category><![CDATA[flutter-translation]]></category>
            <category><![CDATA[flutter-app-development]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Juzuli M P]]></dc:creator>
            <pubDate>Sat, 06 Jul 2024 14:19:53 GMT</pubDate>
            <atom:updated>2024-07-16T09:52:34.907Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3pVnPLNMP_yRGx-Lp_f-Fw.jpeg" /></figure><p>Imagine you’ve just been tasked with taking your company’s successful local app and preparing it for a global audience. Your mission, should you choose to accept it, is to implement localization using the easy_localization package. This guide will be your companion on this exciting journey of making your Flutter app multilingual.</p><h3>Chapter 1: Preparations for the Journey</h3><p>Before we set off on our localization adventure, we need to pack our bags with the essentials.</p><h3>Step 1: Project Setup</h3><ol><li>1. First, add easy_localization to your pubspec.yaml:</li></ol><p><a href="https://pub.dev/packages/easy_localization">easy_localization | Flutter package</a></p><pre>dependencies:<br>  flutter:<br>    sdk: flutter<br>  easy_localization: ^3.0.0</pre><p>1.2. Run flutter pub get to fetch the package. Think of this as stocking up on supplies for the journey ahead.</p><p>1.3. Now, let’s create our project structure:<br>Create folder and add translation files like this</p><pre>assets<br>└── translations<br>    ├── {languageCode}.{ext}                  //only language code<br>    └── {languageCode}-{countryCode}.{ext}    //or full locale code</pre><p>Example:</p><pre>assets<br>└── translations<br>    ├── en.json<br>    └── en-US.json</pre><p>Declare your assets localization directory in pubspec.yaml:</p><pre>flutter:<br>  assets:<br>    - assets/translations/</pre><pre>project-name<br>├── assets<br>│   └── translations<br>│       ├── en.json<br>│       ├── es.json<br>│       └── fr.json<br>└── lib<br>    └── translations<br>        ├── codegen_loader.g.dart<br>        └── locale_keys.g.dart</pre><p>This structure will be our map, guiding us through the localization landscape.</p><h3>Chapter 2: Setting Up Base Camp</h3><p>With our supplies packed, it’s time to set up our base camp — the foundation of our localized app.</p><h3>Step 2: Initialize easy_localization</h3><p>In main.dart, we&#39;ll initialize easy_localization. This is like setting up our universal translator:</p><pre>import &#39;package:easy_localization/easy_localization.dart&#39;; // Import package<br><br>void main() async {<br>  WidgetsFlutterBinding.ensureInitialized();<br><br>  // ensureInitialized needs to be called in main so that savedLocale is loaded and used from the start.<br>  await EasyLocalization.ensureInitialized();<br><br>  runApp(<br>    // Wrap EasyLocalization widget on MyApp()<br>    EasyLocalization(<br>      // Provide list of supported locales in supportedLocales<br>      supportedLocales: [Locale(&#39;en&#39;), Locale(&#39;es&#39;), Locale(&#39;fr&#39;)],<br>      // Provide path to your folder with localization files<br>      path: &#39;assets/translations&#39;,<br>      // Provide fallbackLocale, Which is the fall back locale when the locale is not in the list<br>      fallbackLocale: Locale(&#39;en&#39;),<br>      child: MyApp(),<br>    ),<br>  );<br>}<br>class MyApp extends StatelessWidget {<br>  @override<br>  Widget build(BuildContext context) {<br>    return MaterialApp(<br>      // The delegates for this app&#39;s Localizations widget<br>      localizationsDelegates: context.localizationDelegates,<br>      // The list of locales that this app has been localized for<br>      supportedLocales: context.supportedLocales,<br>      // The initial locale for this app&#39;s Localizations widget is based on this value<br>      locale: context.locale,<br>      home: HomeScreen(),<br>    );<br>  }<br>}</pre><h3>Chapter 3: Creating Our Phrasebooks</h3><p>Now that we have our base camp set up, it’s time to create our phrasebooks for each language.</p><h3>Step 3: Create Translation Files</h3><p>In the assets/translations folder, we&#39;ll create JSON files for each language. Let&#39;s start with en.json:</p><pre>{<br>  &quot;hello&quot;: &quot;Hello!&quot;,<br>  &quot;welcome&quot;: &quot;Welcome to our app, {name}!&quot;,<br>  &quot;items_count&quot;: {<br>    &quot;zero&quot;: &quot;No items&quot;,<br>    &quot;one&quot;: &quot;1 item&quot;,<br>    &quot;other&quot;: &quot;{} items&quot;<br>  }<br>}</pre><p>Create similar files for es.json and fr.json, translating the content appropriately. These files will be our trusted guides in each language territory.</p><h3>Chapter 4: The Magic of Code Generation</h3><p>With our phrasebooks ready, it’s time to work some magic and generate our Dart files.</p><h3>Step 4: Generate Localization Files</h3><p>Run these commands to generate the necessary Dart files:</p><pre>dart run easy_localization:generate -S &quot;assets/translations&quot; -O &quot;lib/translations&quot;<br>dart run easy_localization:generate -S &quot;assets/translations&quot; -O &quot;lib/translations&quot; -o &quot;locale_keys.g.dart&quot; -f keys</pre><p>This creates codegen_loader.g.dart and locale_keys.g.dart in your lib/translations directory. Think of these as your universal translators, ready to help your app speak multiple languages.</p><h3>Chapter 5: Speaking in Tongues</h3><p>Now comes the exciting part — making our app multilingual!</p><h3>Step 5: Using Translations</h3><p>5.1. Import the generated locale keys in your Dart files:</p><pre>import &#39;package:your_project/translations/locale_keys.g.dart&#39;;<br>import &#39;package:easy_localization/easy_localization.dart&#39;;</pre><p>5.2. Use translations in widgets:</p><pre>Text(LocaleKeys.hello.tr())</pre><p>5.3. For translations with arguments:</p><pre>Text(LocaleKeys.welcome.tr(args: [&#39;John&#39;]))</pre><p>5.4. For plurals:</p><pre>Text(LocaleKeys.items_count.plural(itemCount))</pre><p>Your app is now beginning to speak in different languages!</p><h3>Chapter 6: Advanced Language Skills</h3><p>As our app becomes more fluent, let’s teach it some advanced language skills.</p><h3>Step 6: Handling Dynamic Content</h3><p>6.1. Using positional arguments:</p><pre>Text(LocaleKeys.greet_name.tr(args: [&#39;John&#39;, &#39;Doe&#39;]))</pre><p>6.2. Using named arguments:</p><pre>Text(LocaleKeys.user_info.tr(namedArgs: {&#39;name&#39;: &#39;Alice&#39;, &#39;age&#39;: &#39;30&#39;}))</pre><h3>Step 7: Gender-Specific Translations</h3><pre>Text(LocaleKeys.gender_message.tr(gender: userGender))</pre><h3>Step 8: Linked Translations</h3><pre>Text(LocaleKeys.dialog_save_button.tr())</pre><h3>Chapter 7: The Power of Choice</h3><p>Let’s give our users the power to choose their preferred language.</p><h3>Step 9: Changing Locales</h3><pre>ElevatedButton(<br>  onPressed: () =&gt; context.setLocale(Locale(&#39;es&#39;)),<br>  child: Text(&#39;Switch to Spanish&#39;),<br>)</pre><h3>Step 10: Accessing Localization Properties</h3><pre>print(context.locale.toString())<br>print(context.supportedLocales)<br>print(context.fallbackLocale)</pre><h3>Epilogue: Best Practices for Our Linguistic Journey</h3><ol><li>Always update your phrasebooks (run code generation) after adding new translations.</li><li>Use meaningful keys in JSON files — they’re like signposts in your code.</li><li>Test your app in all languages — you don’t want to accidentally insult someone!</li><li>As your app’s vocabulary grows, consider using a translation management system.</li><li>Keep your translation files up to date — language is living, and so should your app be.</li></ol><p>By following this journey, you’ve transformed your app into a global citizen, ready to converse with users around the world. Remember, localization is an ongoing adventure — keep exploring, keep learning, and your app will continue to connect with people across languages and cultures.</p><p><strong>Happy coding, and may your app’s linguistic journey be a successful one!</strong> 🌍🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ebf5d93b871a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>