<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sagar Ghag</title>
    <description>The latest articles on DEV Community by Sagar Ghag (@ghagsagar23).</description>
    <link>https://dev.to/ghagsagar23</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4016716%2F3b117c4e-7c91-4107-903e-a8468d8bdcfb.png</url>
      <title>DEV Community: Sagar Ghag</title>
      <link>https://dev.to/ghagsagar23</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ghagsagar23"/>
    <language>en</language>
    <item>
      <title>Patches Welcome #7: Your Scheduled Notification Disappears If the User's Calendar Isn't Gregorian</title>
      <dc:creator>Sagar Ghag</dc:creator>
      <pubDate>Fri, 27 Nov 2026 20:49:22 +0000</pubDate>
      <link>https://dev.to/ghagsagar23/patches-welcome-7-your-scheduled-notification-disappears-if-the-users-calendar-isnt-gregorian-gi9</link>
      <guid>https://dev.to/ghagsagar23/patches-welcome-7-your-scheduled-notification-disappears-if-the-users-calendar-isnt-gregorian-gi9</guid>
      <description>&lt;p&gt;&lt;code&gt;zonedSchedule&lt;/code&gt; notifications on iOS and macOS fire correctly on most devices. Set the device calendar to Islamic, Buddhist, or Japanese, and the notification is silently dropped. No error, no callback, nothing in the console. It just doesn't fire.&lt;/p&gt;

&lt;h3&gt;
  
  
  How I found it
&lt;/h3&gt;

&lt;p&gt;I was wiring up shift-end reminders in a workforce app. QA passed on every device we had. A field tester in the Middle East reported that reminders never arrived. Their iPhone was set to the Hijri calendar. That was the only difference.&lt;/p&gt;

&lt;h3&gt;
  
  
  The mechanism
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;flutter_local_notifications&lt;/code&gt; builds an &lt;code&gt;NSDateComponents&lt;/code&gt; from the target date to create a &lt;code&gt;UNCalendarNotificationTrigger&lt;/code&gt;. On iOS, &lt;code&gt;FlutterLocalNotificationsPlugin.m:878&lt;/code&gt; uses &lt;code&gt;[NSCalendar currentCalendar]&lt;/code&gt; for the decomposition. On macOS, the Swift equivalent uses &lt;code&gt;Calendar.current&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;When the device calendar is Islamic, &lt;code&gt;currentCalendar&lt;/code&gt; returns a Hijri calendar. Decomposing a 2026 Gregorian date into Hijri components gives you year 1448, month values in a different range, day counts that don't map. &lt;code&gt;UNCalendarNotificationTrigger&lt;/code&gt; reads those components as Gregorian (it always does), sees a date in the past by roughly 578 years, and discards the trigger.&lt;/p&gt;

&lt;p&gt;The input date is an ISO 8601 string parsed via &lt;code&gt;ISO8601DateFormatter&lt;/code&gt;, which always produces a Gregorian date. The decomposition has to match.&lt;/p&gt;

&lt;h3&gt;
  
  
  The fix
&lt;/h3&gt;

&lt;p&gt;Two lines. One per platform.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;iOS (Objective-C):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight objective_c"&gt;&lt;code&gt;&lt;span class="nc"&gt;NSCalendar&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;calendar&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nc"&gt;NSCalendar&lt;/span&gt; &lt;span class="n"&gt;alloc&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="n"&gt;initWithCalendarIdentifier&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nc"&gt;NSCalendarIdentifierGregorian&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;macOS (Swift):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="n"&gt;calendar&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Calendar&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;identifier&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;gregorian&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2 additions, 2 deletions. The diff is symmetrical because the bug is symmetrical.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why it went unnoticed
&lt;/h3&gt;

&lt;p&gt;Most developers and most CI runners use Gregorian calendars. The plugin's own test suite doesn't mock a non-Gregorian calendar context. And the failure is silent: &lt;code&gt;UNCalendarNotificationTrigger&lt;/code&gt; doesn't throw or log when the date components resolve to the past. It just never fires. You'd only catch this with a physical device (or simulator) set to a non-Gregorian locale and a notification you're actually waiting for.&lt;/p&gt;

&lt;p&gt;I verified the fix on an iOS Simulator set to &lt;code&gt;ar_SA&lt;/code&gt; (Islamic calendar). I haven't tested Buddhist (&lt;code&gt;th_TH&lt;/code&gt;) or Japanese imperial, but the code path is identical: &lt;code&gt;currentCalendar&lt;/code&gt; returns whatever the user has, and the fix bypasses it entirely.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/MaikuB/flutter_local_notifications/pull/2867" rel="noopener noreferrer"&gt;PR #2867&lt;/a&gt; · &lt;a href="https://github.com/MaikuB/flutter_local_notifications/issues/2866" rel="noopener noreferrer"&gt;Issue #2866&lt;/a&gt; · &lt;a href="https://github.com/MaikuB/flutter_local_notifications" rel="noopener noreferrer"&gt;MaikuB/flutter_local_notifications&lt;/a&gt;&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>ios</category>
      <category>opensource</category>
      <category>mobile</category>
    </item>
    <item>
      <title>Patches Welcome #8: Korean Filenames Arrived as Scattered Consonants on Windows</title>
      <dc:creator>Sagar Ghag</dc:creator>
      <pubDate>Fri, 27 Nov 2026 20:47:03 +0000</pubDate>
      <link>https://dev.to/ghagsagar23/patches-welcome-8-korean-filenames-arrived-as-scattered-consonants-on-windows-3ocp</link>
      <guid>https://dev.to/ghagsagar23/patches-welcome-8-korean-filenames-arrived-as-scattered-consonants-on-windows-3ocp</guid>
      <description>&lt;p&gt;Send a file named &lt;code&gt;오삐한테-예전.txt&lt;/code&gt; from macOS to Windows via LocalSend. What arrives is a filename of decomposed jamo: individual consonants and vowels floating apart instead of composed syllables. The file opens fine. The name is unreadable.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why macOS sends broken Korean
&lt;/h3&gt;

&lt;p&gt;macOS (HFS+ and APFS) stores filenames in Unicode NFD, the decomposed form. The Korean syllable &lt;code&gt;오&lt;/code&gt; (U+C624) becomes three separate codepoints: &lt;code&gt;ㅇ&lt;/code&gt; (U+110B) + &lt;code&gt;ㅗ&lt;/code&gt; (U+1169). On macOS this renders correctly because the OS recomposes on display. Windows doesn't. It renders each codepoint individually, so you see scattered jamo.&lt;/p&gt;

&lt;p&gt;This isn't a Korean-only problem. Latin accented characters hit the same thing: &lt;code&gt;résumé.txt&lt;/code&gt; sent from macOS can arrive as &lt;code&gt;résumé.txt&lt;/code&gt; with combining diacritics on Windows, though most Windows fonts handle Latin combining marks well enough that users don't notice. Korean is where it's visible.&lt;/p&gt;

&lt;h3&gt;
  
  
  Where the fix goes
&lt;/h3&gt;

&lt;p&gt;LocalSend's Rust core has a &lt;code&gt;sanitize_with()&lt;/code&gt; function in &lt;code&gt;packages/core/src/util/filename.rs&lt;/code&gt;. Every file save routes through it: direct transfers, folder transfers, gallery-cache saves, SAF paths. One choke point. That's where NFC normalization belongs.&lt;/p&gt;

&lt;p&gt;I added &lt;code&gt;unicode-normalization = "0.1"&lt;/code&gt; to the Rust crate (mature dependency, 100M+ downloads on crates.io) and a single &lt;code&gt;.nfc().collect::&amp;lt;String&amp;gt;()&lt;/code&gt; call at the top of &lt;code&gt;sanitize_with()&lt;/code&gt;. The &lt;code&gt;is_valid()&lt;/code&gt; function now rejects non-NFC names too, so the invariant between validation and sanitization holds.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="n"&gt;unicode_normalization&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nc"&gt;UnicodeNormalization&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;nfc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;collect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;157 additions, 10 deletions. Most of that is tests and an integration test in &lt;code&gt;v2_server.rs&lt;/code&gt;. The core logic change is two lines.&lt;/p&gt;

&lt;h3&gt;
  
  
  The dependency question
&lt;/h3&gt;

&lt;p&gt;Adding a crate to a 10K-star project isn't free. I considered doing NFC normalization by hand, but Unicode normalization tables are 30K+ entries and the edge cases around Hangul Jamo composition are well-documented traps. &lt;code&gt;unicode-normalization&lt;/code&gt; is the standard Rust answer. It's what &lt;code&gt;rustc&lt;/code&gt; itself uses internally. I called this out in the PR and the maintainers agreed.&lt;/p&gt;

&lt;h3&gt;
  
  
  What NFC means here
&lt;/h3&gt;

&lt;p&gt;NFC (Canonical Decomposition followed by Canonical Composition) is the W3C recommendation. It's what Windows, Linux, and most web systems expect. macOS is the outlier. Normalizing on receive at the file-save boundary is the correct place: you want the filename the recipient sees to match what the sender typed, regardless of which OS is doing the rendering.&lt;/p&gt;

&lt;p&gt;I tested with &lt;code&gt;cargo test&lt;/code&gt; (19 tests, 0 failures) but the manual macOS-to-Windows transfer I couldn't do myself. I don't have a Windows machine on my desk. The PR has a manual test plan checkbox for it; someone on the LocalSend team verified before merge.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/localsend/localsend/pull/3683" rel="noopener noreferrer"&gt;PR #3683&lt;/a&gt; · &lt;a href="https://github.com/localsend/localsend/issues/3676" rel="noopener noreferrer"&gt;Issue #3676&lt;/a&gt; · &lt;a href="https://github.com/localsend/localsend" rel="noopener noreferrer"&gt;localsend/localsend&lt;/a&gt;&lt;/p&gt;

</description>
      <category>rust</category>
      <category>opensource</category>
      <category>unicode</category>
      <category>debugging</category>
    </item>
    <item>
      <title>Patches Welcome #6: A Colon in a Story Name Broke Widgetbook's Entire Canvas</title>
      <dc:creator>Sagar Ghag</dc:creator>
      <pubDate>Fri, 27 Nov 2026 20:46:16 +0000</pubDate>
      <link>https://dev.to/ghagsagar23/patches-welcome-6-a-colon-in-a-story-name-broke-widgetbooks-entire-canvas-1o0h</link>
      <guid>https://dev.to/ghagsagar23/patches-welcome-6-a-colon-in-a-story-name-broke-widgetbooks-entire-canvas-1o0h</guid>
      <description>&lt;p&gt;Stories with a colon in the name don't render on web. You click the story, the canvas stays on "Welcome to Widgetbook", and nothing errors. No crash, no red text. The component just isn't there.&lt;/p&gt;

&lt;h3&gt;
  
  
  The report
&lt;/h3&gt;

&lt;p&gt;Issue &lt;a href="https://github.com/widgetbook/widgetbook/issues/2059" rel="noopener noreferrer"&gt;#2059&lt;/a&gt;. A developer had a story named &lt;code&gt;Profile (tap: Accept)&lt;/code&gt;. Worked fine on desktop. On web, the canvas stayed blank. Every story without a colon rendered normally.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why colons break paths on web
&lt;/h3&gt;

&lt;p&gt;Widgetbook builds navigation paths by joining story names with &lt;code&gt;package:path&lt;/code&gt;'s &lt;code&gt;p.join&lt;/code&gt;. On native platforms, &lt;code&gt;p.join&lt;/code&gt; uses POSIX rules. On web, it uses URL rules. That's the trap.&lt;/p&gt;

&lt;p&gt;URL path semantics treat a colon as a scheme separator. &lt;code&gt;p.url.join('Folder/Component', 'Profile (tap: Accept)')&lt;/code&gt; sees &lt;code&gt;tap:&lt;/code&gt; as a URI scheme and drops the parent segment entirely:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Folder/Component'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Profile (tap: Accept)'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;// → 'Profile (tap: Accept)'  ← parent gone&lt;/span&gt;

&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;posix&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Folder/Component'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Profile (tap: Accept)'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;// → 'Folder/Component/Profile (tap: Accept)'  ← correct&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The navigation tree builds with the wrong path, the router can't resolve it, and the canvas falls back to the welcome screen. No error because it's a valid path lookup that returns nothing.&lt;/p&gt;

&lt;h3&gt;
  
  
  The fix
&lt;/h3&gt;

&lt;p&gt;Replace &lt;code&gt;p.join&lt;/code&gt; / &lt;code&gt;p.split&lt;/code&gt; with &lt;code&gt;p.posix.join&lt;/code&gt; / &lt;code&gt;p.posix.split&lt;/code&gt; in the five runtime files that build and resolve story paths: &lt;code&gt;component.dart&lt;/code&gt;, &lt;code&gt;scenario.dart&lt;/code&gt;, &lt;code&gt;story.dart&lt;/code&gt;, &lt;code&gt;tree.dart&lt;/code&gt;, &lt;code&gt;tree_node.dart&lt;/code&gt;. Import narrowed to &lt;code&gt;show posix&lt;/code&gt; so nobody drifts back to the default context.&lt;/p&gt;

&lt;p&gt;86 lines added, 12 deleted. Most of that is tests: &lt;code&gt;colon_in_path_test.dart&lt;/code&gt; with five cases covering &lt;code&gt;Component.fullPath&lt;/code&gt;, &lt;code&gt;Story.path&lt;/code&gt;, &lt;code&gt;Scenario.path&lt;/code&gt;, &lt;code&gt;TreeNode.path&lt;/code&gt;, and &lt;code&gt;TreeNode.findByPath&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  The part that's subtle
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;package:path&lt;/code&gt; doing platform detection on web is documented behaviour. It's not a bug in the library. The issue is that Widgetbook's navigation paths are logical paths, not URLs, so they should never have been built with URL semantics regardless of which platform the code runs on. POSIX is the right context because these paths never hit a URL parser. The colon just made the mismatch visible.&lt;/p&gt;

&lt;h3&gt;
  
  
  What I couldn't test
&lt;/h3&gt;

&lt;p&gt;I confirmed the fix on Chrome and in the test suite, but I didn't test Safari or Firefox. The &lt;code&gt;package:path&lt;/code&gt; platform detection should be identical across browsers (it keys on &lt;code&gt;dart.library.html&lt;/code&gt;, not the user agent), but I haven't verified that personally.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/widgetbook/widgetbook/pull/2061" rel="noopener noreferrer"&gt;PR #2061&lt;/a&gt; · &lt;a href="https://github.com/widgetbook/widgetbook/issues/2059" rel="noopener noreferrer"&gt;Issue #2059&lt;/a&gt; · &lt;a href="https://github.com/widgetbook/widgetbook" rel="noopener noreferrer"&gt;widgetbook/widgetbook&lt;/a&gt;&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>dart</category>
      <category>opensource</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How I'm Systematising My UK Global Talent Visa Application as a Developer</title>
      <dc:creator>Sagar Ghag</dc:creator>
      <pubDate>Wed, 25 Nov 2026 17:29:14 +0000</pubDate>
      <link>https://dev.to/ghagsagar23/how-im-systematising-my-uk-global-talent-visa-application-as-a-developer-39e4</link>
      <guid>https://dev.to/ghagsagar23/how-im-systematising-my-uk-global-talent-visa-application-as-a-developer-39e4</guid>
      <description>&lt;p&gt;Every developer I know who's applied for the UK Global Talent Visa describes the same mess — evidence in scattered Google Docs, sources you can't trace back, referee status tracked in your head, and no way to know if you're actually ready to submit.&lt;/p&gt;

&lt;p&gt;I hit that wall a few months into my prep. So I did what any engineer would do: I built a system.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;The GTV application (digital technology route) requires:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A personal statement&lt;/li&gt;
&lt;li&gt;3 recommendation letters from senior industry figures&lt;/li&gt;
&lt;li&gt;Evidence across a mandatory criterion + 2 optional criteria (typically 6 pieces)&lt;/li&gt;
&lt;li&gt;Every claim backed by a dated, verifiable source&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's dozens of documents, sources, and dependencies — with no structure provided by the endorsing body. Most applicants track this in spreadsheets or Notion. Both break down once you have 10+ sources and cross-references between evidence items.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I built
&lt;/h2&gt;

&lt;p&gt;A local-first preparation system that runs entirely on your machine. Everything is markdown ead by a Python dashboard in real time.&lt;/p&gt;

&lt;h3&gt;
  
  
  Readiness dashboard
&lt;/h3&gt;

&lt;p&gt;A weighted score across five dimensions: tasks, evidence, sources, referees, and timeline. Nment outcome — a measure of preparation completeness.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx8jsin13ij6m2hn7d39h.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx8jsin13ij6m2hn7d39h.jpg" alt=" " width="799" height="408"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Task tracker
&lt;/h3&gt;

&lt;p&gt;16 starter tasks across three workstreams (setup, recognition, open-source), filterable by wstatus. Each task has priority, completion criteria, and linked evidence items.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4ax8h3idc3z493sp4bnq.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4ax8h3idc3z493sp4bnq.jpg" alt=" " width="799" height="408"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Evidence dossiers
&lt;/h3&gt;

&lt;p&gt;Six structured dossiers — 2 for the mandatory criterion, 2 each for optional criteria 2 and linked sources, gaps, and status.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5qch0lmmx3poxfla7vd7.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5qch0lmmx3poxfla7vd7.jpg" alt=" " width="799" height="408"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Source provenance
&lt;/h3&gt;

&lt;p&gt;Every claim maps to a source with a stable SRC-ID, verification state, and evidence allocatiead that?" moments.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwj8jr4jwp18ugd0wk5f1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwj8jr4jwp18ugd0wk5f1.jpg" alt=" " width="799" height="408"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Timeline
&lt;/h3&gt;

&lt;p&gt;Milestone tracking with days-until-submission countdown and related task completion.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fax1r7o3hgph0b6otdeeh.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fax1r7o3hgph0b6otdeeh.jpg" alt=" " width="799" height="408"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Semantic search
&lt;/h3&gt;

&lt;p&gt;RAG-powered search across all your prep materials — tasks, evidence, sources. Hybrid mode col matching.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcdr7o6jebretd3gq7x7r.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcdr7o6jebretd3gq7x7r.jpg" alt=" " width="799" height="408"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Python&lt;/strong&gt; — dashboard server, indexer, search engine&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;sentence-transformers&lt;/strong&gt; — ~80MB model for semantic search, downloads once&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Markdown&lt;/strong&gt; — all data files, no database&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Git&lt;/strong&gt; — version control your entire application history&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Docker&lt;/strong&gt; — &lt;code&gt;docker compose up&lt;/code&gt; if you don't want a Python install&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Zero cloud dependencies. Nothing leaves your machine.&lt;/p&gt;

&lt;h2&gt;
  
  
  AI-assisted prep
&lt;/h2&gt;

&lt;p&gt;The repo ships with an &lt;code&gt;AGENTS.md&lt;/code&gt; file that gives any AI tool (Claude Code, Cursor, Copilotlication structure. Open the repo in your editor and the AI understands your evidence,sources, gaps, and progress without explanation.&lt;/p&gt;

&lt;p&gt;There's also a prompt library with 15+ tested prompts for drafting evidence, auditing source links, checking referee eligibility, and running weekly reviews.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I learned building it
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Source provenance is the bottleneck, not writing.&lt;/strong&gt; Most applicants focus on drafting evidence narratives. The actual blocker is tracing every claim to a dated, verifiable source. The system forces you to&lt;br&gt;
register sources before citing them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Readiness scores change your behaviour.&lt;/strong&gt; Seeing "25% ready" with a breakdown of where theng than a checklist. You stop guessing and start closing specific gaps.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Git history is an underrated prep tool.&lt;/strong&gt; Being able to &lt;code&gt;git log&lt;/code&gt; your evidence evolution veloped — useful for the personal statement.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;Two options depending on where you are in your prep:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://payhip.com/b/iOPS0" rel="noopener noreferrer"&gt;Endorsed Starter — $49&lt;/a&gt;&lt;/strong&gt; — The full system: dashboard, task , source register, referee tracking, semantic search, AI prompt library. Everything you needto go from zero to submission-ready.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://payhip.com/b/2xFOd" rel="noopener noreferrer"&gt;Endorsed Complete — $79&lt;/a&gt;&lt;/strong&gt; — Everything in Starter, plus a structurally complete example application showing what a mid-to-late-stage prep looks like with filled dossiers, 12&lt;br&gt;
registered sources, and realistic progress. Useful if you want to see the end state before b&lt;/p&gt;

&lt;p&gt;Both run locally in under 2 minutes:&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
bash
unzip endorsed-starter.zip -d my-gtv-app
cd my-gtv-app
python3 setup.py
# Dashboard live at http://localhost:8765

If you're prepping for the GTV and have questions about the system or the process, drop a cot I've learned so far.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>webdev</category>
      <category>python</category>
      <category>opensource</category>
      <category>career</category>
    </item>
    <item>
      <title>Your Android App Is Dying in the Background and You Don't Know Why</title>
      <dc:creator>Sagar Ghag</dc:creator>
      <pubDate>Mon, 16 Nov 2026 08:50:26 +0000</pubDate>
      <link>https://dev.to/ghagsagar23/your-android-app-is-dying-in-the-background-and-you-dont-know-why-2g22</link>
      <guid>https://dev.to/ghagsagar23/your-android-app-is-dying-in-the-background-and-you-dont-know-why-2g22</guid>
      <description>&lt;p&gt;509 timestamp gaps across 159 tracking sessions. That was the number we found when we finally audited what happens to our Android app when the OS kills it in the background.&lt;/p&gt;

&lt;p&gt;We run a workforce tracking app on 30 BYOD Android devices. The app needs to record GPS coordinates every few minutes, even when the screen is off. The problem is that Android doesn't want your app running in the background. Between Doze mode, OEM battery optimisations, user force-stops, and reboots, there are at least five distinct ways your app can die without your code ever seeing an exception.&lt;/p&gt;

&lt;p&gt;I wrote a preprint that formalises this into a measurement framework: a kill-cause taxonomy, an instrumentation specification, and a classification procedure. The paper and data are open access on Zenodo: &lt;a href="https://doi.org/10.5281/zenodo.24262951" rel="noopener noreferrer"&gt;DOI: 10.5281/zenodo.24262951&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Five Ways Your App Dies
&lt;/h2&gt;

&lt;p&gt;Most developers know about Doze. Fewer know about OEM kills. The taxonomy from the paper:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Doze Kill.&lt;/strong&gt; Android suspends network and defers alarms after the screen goes off and the device is stationary. Your foreground service keeps running, but your alarms stop firing. The signal: scheduled events stop arriving, but the process is still alive when the user returns.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. OEM Kill.&lt;/strong&gt; Huawei's PowerGenie, Xiaomi's MIUI battery saver, Samsung's Sleeping Apps. These are manufacturer-specific processes that kill apps the stock Android wouldn't. On our fleet, a Huawei P30 Lite killed the tracking service 3x more often than a Pixel 4a running the same APK. The signal: process death with no ANR, no crash, and the kill timestamp in the OEM's proprietary log (if you can find it).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. User Force Stop.&lt;/strong&gt; The user goes to Settings &amp;gt; Apps &amp;gt; Force Stop. Your app gets no callback. &lt;code&gt;onDestroy&lt;/code&gt; does not fire. The signal: sudden silence in all telemetry, and the user has to manually reopen the app.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Reboot.&lt;/strong&gt; Device restarts (OS update, battery death, user-initiated). Your &lt;code&gt;BOOT_COMPLETED&lt;/code&gt; receiver fires, but there's a gap between the kill and the restart. On our fleet, the median gap was 4 minutes; the worst was 6 hours (a device that ran out of battery overnight).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Permission Revocation.&lt;/strong&gt; Android 11+ can auto-revoke permissions for unused apps. If your app loses location permission while in the background, the service continues running but gets empty location results. No exception. No crash. Just silence where coordinates used to be.&lt;/p&gt;

&lt;h2&gt;
  
  
  What We Found in Production
&lt;/h2&gt;

&lt;p&gt;We audited Zontra, a 104,886-line Flutter app deployed on 30 devices over 6 months:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;6 of 7 signals already existed&lt;/strong&gt; in the codebase (session start/end, location updates, connectivity changes, app lifecycle, battery level)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;12 gaps&lt;/strong&gt; where the existing telemetry couldn't distinguish between kill causes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;509 timestamp gaps&lt;/strong&gt; across 159 tracking sessions where the cause couldn't be determined&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The biggest gap was classification. We could see the app stopped sending coordinates at 02:14 and resumed at 06:30. Was that Doze? An OEM kill? A reboot? The existing telemetry couldn't tell.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Classification Procedure
&lt;/h2&gt;

&lt;p&gt;The paper provides a decision tree for mapping observable signals to kill causes. The key disambiguation: Doze kills preserve the process (the app is alive but deferred), while OEM kills terminate it entirely. If your app's &lt;code&gt;onCreate&lt;/code&gt; fires on resume, the process was killed. If it doesn't, the process survived and only the scheduled work was deferred.&lt;/p&gt;

&lt;p&gt;I haven't tested this on iOS yet. Apple's background execution model is different enough that the taxonomy doesn't transfer directly.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Paper
&lt;/h2&gt;

&lt;p&gt;Full methodology, taxonomy, instrumentation spec, and validation audit: &lt;a href="https://doi.org/10.5281/zenodo.24262951" rel="noopener noreferrer"&gt;doi.org/10.5281/zenodo.24262951&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you're building an Android app that does anything in the background, you're fighting the same problem. The question is whether you've instrumented well enough to know which fights you're losing.&lt;/p&gt;

</description>
      <category>android</category>
      <category>flutter</category>
      <category>mobile</category>
      <category>opensource</category>
    </item>
    <item>
      <title>19 Custom Lint Rules Killed Design-System Drift in Two Production Flutter Apps</title>
      <dc:creator>Sagar Ghag</dc:creator>
      <pubDate>Mon, 16 Nov 2026 08:49:34 +0000</pubDate>
      <link>https://dev.to/ghagsagar23/19-custom-lint-rules-killed-design-system-drift-in-two-production-flutter-apps-5a15</link>
      <guid>https://dev.to/ghagsagar23/19-custom-lint-rules-killed-design-system-drift-in-two-production-flutter-apps-5a15</guid>
      <description>&lt;p&gt;&lt;code&gt;Colors.red&lt;/code&gt; in a Flutter widget. Sounds harmless. In a production app with a design system, it's a landmine: one developer uses &lt;code&gt;Colors.red&lt;/code&gt;, another uses &lt;code&gt;Theme.of(context).colorScheme.error&lt;/code&gt;, and six months later your app ships with two shades of red on the same screen and nobody can explain why.&lt;/p&gt;

&lt;p&gt;We had this problem across two production Flutter codebases (105K LOC and 59K LOC). Instead of writing a style guide nobody reads, we wrote 19 custom lint rules using the &lt;code&gt;custom_lint&lt;/code&gt; framework. 13 are org-wide (published as &lt;code&gt;kx_lints&lt;/code&gt; on pub.dev). 6 are project-specific.&lt;/p&gt;

&lt;p&gt;I wrote a preprint measuring the results: &lt;a href="https://doi.org/10.5281/zenodo.24263596" rel="noopener noreferrer"&gt;DOI: 10.5281/zenodo.24263596&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Drift Problem
&lt;/h2&gt;

&lt;p&gt;Design-system drift is when developers bypass your theme and use hardcoded values. In Flutter, the most common forms are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Colors.red&lt;/code&gt; instead of &lt;code&gt;Theme.of(context).colorScheme.error&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;TextStyle(fontSize: 16)&lt;/code&gt; instead of &lt;code&gt;Theme.of(context).textTheme.bodyLarge&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Direct &lt;code&gt;import 'package:flutter/material.dart'&lt;/code&gt; in files that should only use the design system's re-export&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;PR review catches some of this. But a reviewer scanning a 400-line diff will miss a &lt;code&gt;Colors.grey&lt;/code&gt; buried on line 287. And even if they don't, the fix is always the same: "use the theme." You're paying a human to do a grep.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the Rules Enforce
&lt;/h2&gt;

&lt;p&gt;The 13 org-wide rules in &lt;code&gt;kx_lints&lt;/code&gt; cover:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;no_material_colors&lt;/code&gt;&lt;/strong&gt;: flags any use of &lt;code&gt;Colors.*&lt;/code&gt; constants&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;no_hardcoded_text_style&lt;/code&gt;&lt;/strong&gt;: flags &lt;code&gt;TextStyle()&lt;/code&gt; constructors outside the theme definition file&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;prefer_theme_colors&lt;/code&gt;&lt;/strong&gt;: flags hex colour literals in widget code&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;no_direct_material_import&lt;/code&gt;&lt;/strong&gt;: flags &lt;code&gt;import 'package:flutter/material.dart'&lt;/code&gt; in favour of the design system's re-export&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The 6 project-specific rules cover patterns unique to one codebase: a particular naming convention for route constants, a required parameter order for the project's base widget, and restrictions on which packages can import which.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Numbers
&lt;/h2&gt;

&lt;p&gt;We measured violation density (violations per thousand lines of code) across monthly snapshots in the Alpha codebase (105K LOC, 7 months of history):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;Colors.*&lt;/code&gt; violations dropped from 0.72 to 0.00 per KLOC&lt;/strong&gt; after the rules landed&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;Theme.of()&lt;/code&gt; density fell 91%&lt;/strong&gt; as developers moved to the typed theme extension&lt;/li&gt;
&lt;li&gt;The rules caught &lt;strong&gt;258 &lt;code&gt;material.dart&lt;/code&gt; imports&lt;/strong&gt; across the org that the org-wide rules alone missed (project-specific rules were needed because some files legitimately import material.dart for widget definitions)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the Beta codebase (59K LOC, 34 days of history), we could only do a HEAD-only analysis. Too little history for a time series. But at HEAD: zero &lt;code&gt;Colors.*&lt;/code&gt; violations, because the rules were in place from day one.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Surprised Me
&lt;/h2&gt;

&lt;p&gt;Project-specific rules exposed violations that org-wide rules missed. The &lt;code&gt;no_direct_material_import&lt;/code&gt; rule flagged 258 imports across the org, but some of those imports were legitimate (widget definition files need material.dart). The project-specific version of the rule had an allowlist for those files. Without it, developers would either ignore the lint or disable it globally, which defeats the point.&lt;/p&gt;

&lt;p&gt;The other surprise: the rules paid for themselves in the first week. One rule (&lt;code&gt;no_material_colors&lt;/code&gt;) caught 23 violations in existing code on its first run. Each violation was a hardcoded colour that diverged from the theme. Fixing them took one developer half a day. Finding them without the rule would have taken longer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setup
&lt;/h2&gt;

&lt;p&gt;The rules use &lt;code&gt;custom_lint&lt;/code&gt; and &lt;code&gt;analyzer_plugin&lt;/code&gt;. Setup is one &lt;code&gt;pubspec.yaml&lt;/code&gt; dependency and a short &lt;code&gt;analysis_options.yaml&lt;/code&gt; include. The rules are open source: &lt;a href="https://pub.dev/packages/kx_lints" rel="noopener noreferrer"&gt;kx_lints on pub.dev&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I would not call the developer experience perfect. &lt;code&gt;custom_lint&lt;/code&gt; occasionally needs a restart of the analysis server, and the error messages could be more specific about which theme accessor to use instead. But the cost of those rough edges is lower than the cost of the drift they prevent.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Paper
&lt;/h2&gt;

&lt;p&gt;Full methodology, violation density timelines, and the mining scripts: &lt;a href="https://doi.org/10.5281/zenodo.24263596" rel="noopener noreferrer"&gt;doi.org/10.5281/zenodo.24263596&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you've built custom lint rules for your Flutter project (or any Dart project), I'm curious whether you went org-wide, project-specific, or both, and how you handled the allowlist problem.&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>dart</category>
      <category>opensource</category>
    </item>
    <item>
      <title>We Took a 105K-LOC Flutter App from Zero Tests to 2,583</title>
      <dc:creator>Sagar Ghag</dc:creator>
      <pubDate>Mon, 16 Nov 2026 07:26:42 +0000</pubDate>
      <link>https://dev.to/ghagsagar23/we-took-a-105k-loc-flutter-app-from-zero-tests-to-2583-i49</link>
      <guid>https://dev.to/ghagsagar23/we-took-a-105k-loc-flutter-app-from-zero-tests-to-2583-i49</guid>
      <description>&lt;p&gt;The app had 105,000 lines of Dart spread across 757 files. Firebase Remote Config, Firestore, FFI calls into Rust for GPS processing, SharedPreferences for half the state management. Zero tests.&lt;/p&gt;

&lt;p&gt;Not "low coverage." Zero. No test directory, no test runner config, no mocks. Seven months of production use on 30 devices, and the first &lt;code&gt;flutter test&lt;/code&gt; invocation in the project's history was mine.&lt;/p&gt;

&lt;p&gt;I wrote a preprint documenting how we got from that zero to 2,583 tests across 292 files. The paper and all companion data are open access on Zenodo: &lt;a href="https://doi.org/10.5281/zenodo.24260880" rel="noopener noreferrer"&gt;DOI: 10.5281/zenodo.24260880&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This post covers the key findings. The paper has the full methodology.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem Nobody Warns You About
&lt;/h2&gt;

&lt;p&gt;Every Flutter testing tutorial starts with a counter app. Tap a button, verify the number. That is not the hard part.&lt;/p&gt;

&lt;p&gt;The hard part is a &lt;code&gt;LocationService&lt;/code&gt; that wraps &lt;code&gt;Geolocator&lt;/code&gt;, which wraps a platform channel, which talks to a GPS chip that returns different accuracy values depending on whether you're indoors, moving, or on a Huawei device where PowerGenie has throttled location updates to once every 15 minutes. You can't mock what you can't define the boundary for.&lt;/p&gt;

&lt;p&gt;We had 43 platform-dependent classes. Each one touched at least one of: Firebase, native GPS via FFI, SharedPreferences, or package_info_plus. The first month was spent not writing tests, but drawing mock boundaries.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Worked
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Coverage-exclusion policy.&lt;/strong&gt; We excluded generated files (&lt;code&gt;*.g.dart&lt;/code&gt;, &lt;code&gt;*.freezed.dart&lt;/code&gt;) and pure platform-channel wrappers from coverage metrics. Not from testing, from metrics. The distinction matters: we still tested the wrappers, but a wrapper that delegates to &lt;code&gt;MethodChannel('gps')&lt;/code&gt; and returns the raw result has exactly one interesting failure mode (the channel throws), and counting its lines toward coverage targets distorts where effort should go.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mock-boundary pattern.&lt;/strong&gt; Every platform dependency got a thin abstract interface. The real implementation lives in one file; the mock in another. No &lt;code&gt;when().thenReturn()&lt;/code&gt; chains longer than three lines. If the mock setup is more complex than the code it replaces, the boundary is in the wrong place.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;17 custom lint rules via &lt;code&gt;kx_lints&lt;/code&gt;.&lt;/strong&gt; We published these as an open-source package on pub.dev. Three of the rules exist solely because test files kept importing production Firebase instances. One rule (&lt;code&gt;no_direct_firebase_access&lt;/code&gt;) caught 23 violations in its first week. The rules are the cheapest part of the whole system: write once, enforce forever.&lt;/p&gt;

&lt;h2&gt;
  
  
  Six Cases Where Tests Caught Production Bugs
&lt;/h2&gt;

&lt;p&gt;The paper documents six specific instances where the test suite caught bugs that would have reached production. I'll describe two here.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Case 1: GPS despiking.&lt;/strong&gt; Our Rust FFI module processes raw GPS coordinates and filters spikes (sudden jumps that occur when the device switches between GPS and network location). A test for the despike threshold caught a regression where a refactor changed the spike detection from 200m to 2000m. That's the difference between "filters the occasional multipath reflection" and "filters nothing." The test failed, the commit was reverted, and 30 field workers never saw jumps in their route history.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Case 2: SharedPreferences race.&lt;/strong&gt; Two cubits wrote to the same SharedPreferences key on shift-end. The tests caught this because they ran both cubits in sequence and asserted on the final state. In production, the race would have silently dropped punch-out timestamps for about 8% of shifts (we measured the frequency in staging after the tests flagged it).&lt;/p&gt;

&lt;h2&gt;
  
  
  The Numbers
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;2,583 tests&lt;/strong&gt; across &lt;strong&gt;292 test files&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;43 platform-dependent classes&lt;/strong&gt; with clean mock boundaries&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;17 custom lint rules&lt;/strong&gt; (13 org-wide via &lt;code&gt;kx_lints&lt;/code&gt;, 4 project-specific)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;6 documented cases&lt;/strong&gt; where tests caught real production bugs before deployment&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The companion repository is at &lt;a href="https://github.com/GhagSagar23/zero-to-tested" rel="noopener noreferrer"&gt;github.com/GhagSagar23/zero-to-tested&lt;/a&gt;. The lint rules are at &lt;a href="https://pub.dev/packages/kx_lints" rel="noopener noreferrer"&gt;kx_lints on pub.dev&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd Do Differently
&lt;/h2&gt;

&lt;p&gt;I wouldn't start with unit tests. I'd start with the lint rules. Three weeks of writing tests before the &lt;code&gt;no_direct_firebase_access&lt;/code&gt; rule existed meant three weeks of finding violations by hand in PR review. The lint rules should have come first; they're the cheapest safety net and they make every subsequent test easier to write correctly.&lt;/p&gt;

&lt;p&gt;I also wouldn't chase 100% line coverage. We settled at a policy that excludes generated code and pure wrappers, and that policy is documented and enforced by CI. The number on the badge matters less than whether the tests actually catch the bugs that matter to your users.&lt;/p&gt;

&lt;p&gt;The full paper is free to read: &lt;a href="https://doi.org/10.5281/zenodo.24260880" rel="noopener noreferrer"&gt;doi.org/10.5281/zenodo.24260880&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you've done something similar in a Flutter codebase (or any mobile codebase with heavy platform integration), I'd like to hear how you handled the mock-boundary problem. Drop a comment or find me on GitHub.&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>dart</category>
      <category>testing</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Patches Welcome #4: I Needed My Dependency to Shut Down Cleanly, So I Patched It</title>
      <dc:creator>Sagar Ghag</dc:creator>
      <pubDate>Sun, 15 Nov 2026 20:35:19 +0000</pubDate>
      <link>https://dev.to/ghagsagar23/patches-welcome-4-i-needed-my-dependency-to-shut-down-cleanly-so-i-patched-it-14m2</link>
      <guid>https://dev.to/ghagsagar23/patches-welcome-4-i-needed-my-dependency-to-shut-down-cleanly-so-i-patched-it-14m2</guid>
      <description>&lt;p&gt;My app's GPS tracking service kept running after an FCM silent push triggered auto-punchout. The app was killed. The background handler ran, punched the user out, and tried to stop the GPS service. The service ignored it. Battery drained until the user manually opened the app.&lt;/p&gt;

&lt;p&gt;The problem wasn't in my code. It was in Tracelet, the GPS tracking library I depend on.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why &lt;code&gt;Tracelet.stop()&lt;/code&gt; doesn't work from a headless isolate
&lt;/h3&gt;

&lt;p&gt;Tracelet is a Flutter GPS tracking library by Ikolvi. My app (Zontra, a field-workforce tracking platform) uses it for all location capture. &lt;code&gt;Tracelet.stop()&lt;/code&gt; works fine when called from the main isolate. It uses Pigeon-generated bindings to talk to the native Android service.&lt;/p&gt;

&lt;p&gt;Pigeon doesn't work from headless isolates. When Firebase Cloud Messaging delivers a silent push to a killed app, Android spins up a headless Dart isolate with no Flutter engine attached. The Pigeon channel isn't registered there. &lt;code&gt;Tracelet.stop()&lt;/code&gt; throws &lt;code&gt;MissingPluginException&lt;/code&gt; and the GPS foreground service continues running.&lt;/p&gt;

&lt;p&gt;I'd been working around this by telling the backend to not send silent pushes when tracking was active. That's fragile. The actual fix needed to happen in Tracelet's native layer.&lt;/p&gt;

&lt;h3&gt;
  
  
  The patch
&lt;/h3&gt;

&lt;p&gt;I filed &lt;a href="https://github.com/Ikolvi/Tracelet/issues/267" rel="noopener noreferrer"&gt;issue #267&lt;/a&gt; and opened &lt;a href="https://github.com/Ikolvi/Tracelet/pull/266" rel="noopener noreferrer"&gt;PR #266&lt;/a&gt;. Three files, 68 lines added.&lt;/p&gt;

&lt;p&gt;On the Kotlin side, I added a &lt;code&gt;"requestTermination"&lt;/code&gt; handler to &lt;code&gt;HeadlessTaskService.kt&lt;/code&gt;'s existing method channel (&lt;code&gt;com.tracelet/methods&lt;/code&gt;). This channel already handles &lt;code&gt;setDynamicHeaders&lt;/code&gt; and &lt;code&gt;setSyncBodyResponse&lt;/code&gt; from headless isolates, so the infrastructure was there. The handler calls &lt;code&gt;TraceletSdk.getInstance(context).stop()&lt;/code&gt; wrapped in try/catch.&lt;/p&gt;

&lt;p&gt;On the Dart side, I added &lt;code&gt;Tracelet.requestTermination()&lt;/code&gt; as a static method that invokes the headless MethodChannel directly. On iOS it catches &lt;code&gt;MissingPluginException&lt;/code&gt; and returns &lt;code&gt;false&lt;/code&gt; (iOS headless architecture is different and out of scope for this PR).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="c1"&gt;// In FCM background handler or other headless isolate:&lt;/span&gt;
&lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;stopped&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nc"&gt;Tracelet&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;requestTermination&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;// true if native service acknowledged, false on iOS or failure&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;GalacticTitan (Tracelet maintainer) merged it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Contributing upstream to your own dependency
&lt;/h3&gt;

&lt;p&gt;This is a different dynamic than contributing to Flutter or a package you don't use. I ship Zontra to production. The GPS service running after punchout is a real support ticket from a real field worker whose phone died at 4pm. I have skin in this fix working.&lt;/p&gt;

&lt;p&gt;That also means I have to be careful about the scope. I could have added a bunch of Zontra-specific things while I had the Tracelet source open. I didn't. The PR does one thing: expose a termination path that works from headless isolates. The issue explains why. The fix is general enough that any app using Tracelet with FCM background handlers benefits.&lt;/p&gt;

&lt;p&gt;I left the analog stick Y-axis question (from the gamepads PR, different repo, same principle) as a reminder: fix what you can verify, flag what you can't, and don't bundle unrelated changes because you happen to be in the neighborhood.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Ikolvi/Tracelet/pull/266" rel="noopener noreferrer"&gt;PR #266&lt;/a&gt; · &lt;a href="https://github.com/Ikolvi/Tracelet/issues/267" rel="noopener noreferrer"&gt;Issue #267&lt;/a&gt; · &lt;a href="https://github.com/Ikolvi/Tracelet" rel="noopener noreferrer"&gt;Ikolvi/Tracelet&lt;/a&gt;&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>gps</category>
      <category>opensource</category>
      <category>android</category>
    </item>
    <item>
      <title>Patches Welcome #5: The Small Ones. CI Workflows, Docs, and Drive-By Fixes</title>
      <dc:creator>Sagar Ghag</dc:creator>
      <pubDate>Sun, 15 Nov 2026 20:35:04 +0000</pubDate>
      <link>https://dev.to/ghagsagar23/patches-welcome-5-the-small-ones-ci-workflows-docs-and-drive-by-fixes-2i7l</link>
      <guid>https://dev.to/ghagsagar23/patches-welcome-5-the-small-ones-ci-workflows-docs-and-drive-by-fixes-2i7l</guid>
      <description>&lt;p&gt;Not every contribution is a debugging saga. Some are Tuesday afternoon drive-bys: you notice a repo is missing CI, or its issue templates are broken, or a release process exists only in the maintainer's head. You spend an hour, open a PR, move on.&lt;/p&gt;

&lt;p&gt;This post covers the small patches that don't justify their own article but still count as real work.&lt;/p&gt;

&lt;h3&gt;
  
  
  aws-msk-kafka-proxy-443: giving a useful repo some structure
&lt;/h3&gt;

&lt;p&gt;Sahil Mathur's &lt;code&gt;aws-msk-kafka-proxy-443&lt;/code&gt; solves a specific problem: connecting to AWS MSK Kafka clusters over port 443 when corporate firewalls block 9094. The Terraform module works. The repo governance didn't exist.&lt;/p&gt;

&lt;p&gt;I opened two PRs back to back in July 2026.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/sahilmathur254/aws-msk-kafka-proxy-443/pull/10" rel="noopener noreferrer"&gt;&lt;strong&gt;PR #10&lt;/strong&gt;&lt;/a&gt; (74 additions): question template with a safety checkbox, &lt;code&gt;config.yml&lt;/code&gt; to disable blank issues and link &lt;code&gt;SECURITY.md&lt;/code&gt;, enhanced PR template with type-of-change checkboxes, a stale workflow (90+14 day auto-close, exempting &lt;code&gt;priority: critical&lt;/code&gt; and &lt;code&gt;security&lt;/code&gt;), and 10 repo labels created via the API (&lt;code&gt;priority: critical&lt;/code&gt;, &lt;code&gt;security&lt;/code&gt;, &lt;code&gt;terraform&lt;/code&gt;, &lt;code&gt;docker&lt;/code&gt;, &lt;code&gt;ci/cd&lt;/code&gt;, &lt;code&gt;dependencies&lt;/code&gt;, &lt;code&gt;needs-triage&lt;/code&gt;, &lt;code&gt;stale&lt;/code&gt;, and two more).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/sahilmathur254/aws-msk-kafka-proxy-443/pull/14" rel="noopener noreferrer"&gt;&lt;strong&gt;PR #14&lt;/strong&gt;&lt;/a&gt; (159 additions, 8 deletions): &lt;code&gt;RELEASE.md&lt;/code&gt; with a SemVer checklist, a release workflow triggered on &lt;code&gt;v*.*.*&lt;/code&gt; tags that extracts the CHANGELOG section, validates Terraform, and creates a GitHub release. Updated &lt;code&gt;CHANGELOG.md&lt;/code&gt; with all v0.1.0 entries. Updated &lt;code&gt;README.md&lt;/code&gt; badge to point at the tagged version.&lt;/p&gt;

&lt;p&gt;Combined: 233 lines across two PRs. Zero code changes to the actual Terraform module. All process and governance. The maintainer merged both within 24 hours.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why I do these
&lt;/h3&gt;

&lt;p&gt;I won't pretend there's a grand strategy behind contributing CI workflows to a Kafka proxy repo. I was evaluating it for a client project, noticed the gaps, and filled them because they'd help me too if I ended up depending on it. Good issue templates and a release workflow make a repo more trustworthy for production use. I wanted the trust signal to exist.&lt;/p&gt;

&lt;p&gt;There's also a pattern I've noticed: small repos with strong technical content and no governance attract zero contributions. Add a &lt;code&gt;CONTRIBUTING.md&lt;/code&gt;, an issue template that asks the right questions, and a stale workflow, and the contribution rate goes up. People don't submit PRs to repos that look abandoned. Even cosmetic structure signals that someone is watching.&lt;/p&gt;

&lt;h3&gt;
  
  
  The ones still cooking
&lt;/h3&gt;

&lt;p&gt;Two Flutter framework PRs are in progress and will get their own posts when they merge:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/flutter/flutter/pull/190953" rel="noopener noreferrer"&gt;&lt;strong&gt;#190953&lt;/strong&gt;&lt;/a&gt;: &lt;code&gt;flutter capture&lt;/code&gt;, a new CLI command for screenshot testing. 1,912 lines. Under review by the Flutter tools team.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/flutter/flutter/pull/191382" rel="noopener noreferrer"&gt;&lt;strong&gt;#191382&lt;/strong&gt;&lt;/a&gt; + engine &lt;a href="https://github.com/flutter/flutter/pull/196040" rel="noopener noreferrer"&gt;&lt;strong&gt;#196040&lt;/strong&gt;&lt;/a&gt;: persistent scrollbar support on macOS, reading &lt;code&gt;NSScroller.preferredScrollerStyle&lt;/code&gt; through &lt;code&gt;AccessibilityFeatures&lt;/code&gt;. Draft, waiting on maintainer feedback on the transport mechanism.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If those land, they'll be the biggest contributions in this series. For now they're open PRs, and open PRs are promises, not contributions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/sahilmathur254/aws-msk-kafka-proxy-443" rel="noopener noreferrer"&gt;aws-msk-kafka-proxy-443&lt;/a&gt; · &lt;a href="https://github.com/sahilmathur254/aws-msk-kafka-proxy-443/pull/10" rel="noopener noreferrer"&gt;PR #10&lt;/a&gt; · &lt;a href="https://github.com/sahilmathur254/aws-msk-kafka-proxy-443/pull/14" rel="noopener noreferrer"&gt;PR #14&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>github</category>
      <category>opensource</category>
      <category>terraform</category>
    </item>
    <item>
      <title>Patches Welcome #3: The Checkbox That Stole Focus</title>
      <dc:creator>Sagar Ghag</dc:creator>
      <pubDate>Thu, 12 Nov 2026 09:00:00 +0000</pubDate>
      <link>https://dev.to/ghagsagar23/patches-welcome-3-the-checkbox-that-stole-focus-5759</link>
      <guid>https://dev.to/ghagsagar23/patches-welcome-3-the-checkbox-that-stole-focus-5759</guid>
      <description>&lt;p&gt;A user types into a text field. Their &lt;code&gt;onChanged&lt;/code&gt; programmatically toggles a checkbox. The text field loses focus mid-keystroke. The keyboard might dismiss on mobile. The user's cursor is gone and they don't know why.&lt;/p&gt;

&lt;p&gt;That's &lt;a href="https://github.com/flutter-form-builder-ecosystem/flutter_form_builder/issues/1495" rel="noopener noreferrer"&gt;issue #1495&lt;/a&gt; in &lt;code&gt;flutter_form_builder&lt;/code&gt;, a package with 1,900+ likes on pub.dev. The checkbox was stealing focus every time its value changed, even when no human touched it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Root cause
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;_FormBuilderCheckboxState&lt;/code&gt; overrides &lt;code&gt;didChange&lt;/code&gt; to call &lt;code&gt;focus()&lt;/code&gt; before delegating to &lt;code&gt;super.didChange(value)&lt;/code&gt;. Every programmatic value change (not just taps) triggers &lt;code&gt;didChange&lt;/code&gt;. So any code path that sets the checkbox value also yanks focus to the checkbox.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="nd"&gt;@override&lt;/span&gt;
&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;didChange&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;bool&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;focus&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// &amp;lt;-- this fires on EVERY value change, not just user taps&lt;/span&gt;
  &lt;span class="k"&gt;super&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;didChange&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;focus()&lt;/code&gt; call was probably added for keyboard accessibility on direct taps. But &lt;code&gt;CheckboxListTile&lt;/code&gt; already handles tap-based focus through its &lt;code&gt;focusNode&lt;/code&gt; parameter. The override was redundant for taps and destructive for programmatic changes.&lt;/p&gt;

&lt;h3&gt;
  
  
  The fix
&lt;/h3&gt;

&lt;p&gt;Delete the override. Seven lines removed, zero added to the widget itself. &lt;code&gt;FormBuilderSwitch&lt;/code&gt; already works this way (no &lt;code&gt;didChange&lt;/code&gt; override), so this brings checkbox in line with its sibling.&lt;/p&gt;

&lt;p&gt;The test I added reproduces the exact scenario from the issue: a &lt;code&gt;FormBuilderTextField&lt;/code&gt; whose &lt;code&gt;onChanged&lt;/code&gt; calls &lt;code&gt;didChange(true)&lt;/code&gt; on a checkbox, then asserts the text field still has focus. 57 lines added total across the widget file and test file. All 149 existing tests pass, &lt;code&gt;flutter analyze&lt;/code&gt; clean.&lt;/p&gt;

&lt;p&gt;Merged by &lt;code&gt;deandreamatias&lt;/code&gt; (one of the package maintainers). Codecov confirmed full coverage on the changed paths.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why small patches matter
&lt;/h3&gt;

&lt;p&gt;This is a 7-line deletion with a 50-line test. The PR took about 40 minutes to write including the regression test. But the bug affects anyone who programmatically controls a &lt;code&gt;FormBuilderCheckbox&lt;/code&gt; from another field's callback. That's a common pattern in multi-step forms: "check the terms box when the user fills the last required field," "toggle a preference when a related dropdown changes." Every one of those integrations would hit this.&lt;/p&gt;

&lt;p&gt;The fix for &lt;code&gt;FormBuilderSwitch&lt;/code&gt; was already in place. Nobody noticed that &lt;code&gt;FormBuilderCheckbox&lt;/code&gt; diverged. That's how these bugs survive in form libraries: each field type is a separate class, the override exists in one but not the other, and the behavioral difference only surfaces when you wire fields together.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/flutter-form-builder-ecosystem/flutter_form_builder/pull/1513" rel="noopener noreferrer"&gt;PR #1513&lt;/a&gt; · &lt;a href="https://github.com/flutter-form-builder-ecosystem/flutter_form_builder/issues/1495" rel="noopener noreferrer"&gt;Issue #1495&lt;/a&gt; · &lt;a href="https://github.com/flutter-form-builder-ecosystem/flutter_form_builder" rel="noopener noreferrer"&gt;flutter_form_builder&lt;/a&gt;&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>dart</category>
      <category>opensource</category>
      <category>forms</category>
    </item>
    <item>
      <title>Patches Welcome #2: A D-pad Bug That Only Showed Up When You Pressed Up</title>
      <dc:creator>Sagar Ghag</dc:creator>
      <pubDate>Tue, 10 Nov 2026 09:00:00 +0000</pubDate>
      <link>https://dev.to/ghagsagar23/patches-welcome-2-a-d-pad-bug-that-only-showed-up-when-you-pressed-up-3ghj</link>
      <guid>https://dev.to/ghagsagar23/patches-welcome-2-a-d-pad-bug-that-only-showed-up-when-you-pressed-up-3ghj</guid>
      <description>&lt;p&gt;Pressing Up on an Android gamepad fired &lt;code&gt;dpadDown&lt;/code&gt;. Pressing Down fired &lt;code&gt;dpadUp&lt;/code&gt;. Left and Right worked fine. The bug lived in a single sign comparison, but finding &lt;em&gt;which&lt;/em&gt; sign comparison took longer than writing the fix.&lt;/p&gt;

&lt;h3&gt;
  
  
  The report
&lt;/h3&gt;

&lt;p&gt;Issue &lt;a href="https://github.com/flame-engine/gamepads/issues/123" rel="noopener noreferrer"&gt;#123&lt;/a&gt; in the Flame engine's &lt;code&gt;gamepads&lt;/code&gt; package. A developer on a Samsung SM-G781B with a GameSir G8 Pro controller posted the raw event log:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GAMEPAD EVENT: button="GamepadButton.dpadUp" axis= null value=0.0
GAMEPAD EVENT: button="GamepadButton.dpadDown" axis= null value=1.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's what pressing Up produces. Up fires &lt;code&gt;dpadDown&lt;/code&gt; with value 1.0. The reporter filed the issue, tagged it with their exact device, Android 13, Flutter 3.44.6, and &lt;code&gt;gamepads: 0.1.10+5&lt;/code&gt;. Clean report.&lt;/p&gt;

&lt;h3&gt;
  
  
  Two inversions make a wrong
&lt;/h3&gt;

&lt;p&gt;Android's &lt;code&gt;AXIS_HAT_Y&lt;/code&gt; natively gives you &lt;code&gt;-1.0&lt;/code&gt; for up and &lt;code&gt;+1.0&lt;/code&gt; for down. The Kotlin side (&lt;code&gt;EventListener.kt:27&lt;/code&gt;) registers the axis with &lt;code&gt;invert = true&lt;/code&gt;, so by the time the value reaches Dart it's already flipped: &lt;code&gt;+1.0&lt;/code&gt; means up.&lt;/p&gt;

&lt;p&gt;The Dart mapping in &lt;code&gt;AndroidMapping.normalizeDpadAxis&lt;/code&gt; didn't know about that flip. It was still mapping per Android's native convention: &lt;code&gt;value &amp;gt; 0&lt;/code&gt; maps to &lt;code&gt;dpadDown&lt;/code&gt;, &lt;code&gt;value &amp;lt; 0&lt;/code&gt; maps to &lt;code&gt;dpadUp&lt;/code&gt;. So the Kotlin layer flips the sign, and the Dart layer interprets the flipped sign as if it hadn't been flipped. Two inversions. The result is backwards.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;AXIS_HAT_X&lt;/code&gt; is not inverted natively, so left and right were fine. That's why only the Y axis was wrong.&lt;/p&gt;

&lt;h3&gt;
  
  
  The fix decision
&lt;/h3&gt;

&lt;p&gt;There were two valid places to fix this: remove the &lt;code&gt;invert = true&lt;/code&gt; in Kotlin, or correct the sign comparison in Dart. I went with Dart. The Kotlin inversion was intentional (the library's raw-value convention treats &lt;code&gt;+1.0&lt;/code&gt; as up), and undoing it would change the raw values downstream consumers might depend on. The Dart mapping is pure and directly unit-testable. One place, not two: fixing both would re-introduce the double inversion silently.&lt;/p&gt;

&lt;p&gt;15 lines added, 4 deleted. The test covers both directions explicitly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="c1"&gt;// raw AXIS_HAT_Y = +1.0 (physical up) -&amp;gt; dpadUp = 1.0, dpadDown = 0.0&lt;/span&gt;
&lt;span class="c1"&gt;// raw AXIS_HAT_Y = -1.0 (physical down) -&amp;gt; dpadDown = 1.0, dpadUp = 0.0&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Spydon (Flame engine maintainer) approved and merged. I called out the fix-location trade-off in the PR description because this is the kind of bug that gets re-introduced by someone who sees the Kotlin inversion, removes it thinking it's wrong, and doesn't realize the Dart side is compensating.&lt;/p&gt;

&lt;h3&gt;
  
  
  What I couldn't verify
&lt;/h3&gt;

&lt;p&gt;I don't own a GameSir G8 Pro. I traced the logic path and wrote the regression test, but end-to-end hardware confirmation on the reporter's exact setup was out of scope. I flagged that in the PR. The fix is correct by code analysis (the double inversion is unambiguous once you read both files), but I haven't personally held the controller and pressed Up.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/flame-engine/gamepads/pull/128" rel="noopener noreferrer"&gt;PR #128&lt;/a&gt; · &lt;a href="https://github.com/flame-engine/gamepads/issues/123" rel="noopener noreferrer"&gt;Issue #123&lt;/a&gt; · &lt;a href="https://github.com/flame-engine/gamepads" rel="noopener noreferrer"&gt;flame-engine/gamepads&lt;/a&gt;&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>gamedev</category>
      <category>opensource</category>
      <category>debugging</category>
    </item>
    <item>
      <title>Happy Diwali! 🪔</title>
      <dc:creator>Sagar Ghag</dc:creator>
      <pubDate>Tue, 10 Nov 2026 07:15:19 +0000</pubDate>
      <link>https://dev.to/kryonex-labs/happy-diwali-3l7</link>
      <guid>https://dev.to/kryonex-labs/happy-diwali-3l7</guid>
      <description>&lt;p&gt;From wireframe meshes to glowing diyas — light finds a way through every network.&lt;/p&gt;

&lt;p&gt;Wishing the dev community a season of clean builds, zero bugs, and bright new ideas.&lt;/p&gt;

&lt;p&gt;— Team Kryonex Labs&lt;/p&gt;

&lt;h1&gt;
  
  
  HappyDiwali #Diwali2026 #DevCommunity
&lt;/h1&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>productivity</category>
      <category>diwali</category>
    </item>
  </channel>
</rss>
