<?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 zain hassan on Medium]]></title>
        <description><![CDATA[Stories by zain hassan on Medium]]></description>
        <link>https://medium.com/@zainhthegreat?source=rss-7b33a463b977------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Stories by zain hassan on Medium</title>
            <link>https://medium.com/@zainhthegreat?source=rss-7b33a463b977------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 11:04:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@zainhthegreat/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[Migration to Flutter 3.10.0 window.locale Deprecated]]></title>
            <link>https://medium.com/@zainhthegreat/migration-to-flutter-3-10-0-window-locale-28966f82a84a?source=rss-7b33a463b977------2</link>
            <guid isPermaLink="false">https://medium.com/p/28966f82a84a</guid>
            <category><![CDATA[flutter-ui]]></category>
            <category><![CDATA[flutter-app-development]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[flutter-migration]]></category>
            <category><![CDATA[deprecated]]></category>
            <dc:creator><![CDATA[zain hassan]]></dc:creator>
            <pubDate>Thu, 11 May 2023 07:19:31 GMT</pubDate>
            <atom:updated>2023-05-11T07:25:52.233Z</atom:updated>
            <content:encoded><![CDATA[<p>Just Upgraded to the new flutter 3.10.0 and the <strong><em>window singleton is deprecated</em></strong> I was fetching the device locale to get initial country code for the user:</p><pre>if (WidgetsBinding.instance.window.locale.countryCode == &#39;AE&#39;) {<br>/// Relevant code<br>}</pre><p>The solution here would be:</p><pre>if (View.of(context).platformDispatcher.locale.countryCode == &#39;AE&#39;) {<br>/// Relevant code<br>}</pre><p>The deprecation window singleton have affected following APIs:</p><ol><li>dart:ui</li><li>BaseBinding classes</li></ol><ul><li>GestureBinding.instance.window,</li><li>SchedulerBinding.instance.window,</li><li>ServicesBinding.instance.window,</li><li>PaintingBinding.instance.window,</li><li>SemanticsBinding.instance.window,</li><li>RendererBinding.instance.window,</li><li>WidgetsBinding.instance.window, or</li><li>WidgetTester.binding.window.</li></ul><p>3. SingletonFlutterView</p><p>4. TestWindow from flutter_test</p><p>For more information please visit <strong><em>https://docs.flutter.dev/release/breaking-changes/window-singleton</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=28966f82a84a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>