<?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: Lamonte</title>
    <description>The latest articles on DEV Community by Lamonte (@exts).</description>
    <link>https://dev.to/exts</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F305552%2F199fcb99-6210-497e-93a4-436baa55df4d.jpg</url>
      <title>DEV Community: Lamonte</title>
      <link>https://dev.to/exts</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/exts"/>
    <language>en</language>
    <item>
      <title>My first PR approved to the Flutter SDK</title>
      <dc:creator>Lamonte</dc:creator>
      <pubDate>Tue, 11 Feb 2020 17:52:13 +0000</pubDate>
      <link>https://dev.to/exts/my-first-pr-approved-to-the-flutter-sdk-4dd2</link>
      <guid>https://dev.to/exts/my-first-pr-approved-to-the-flutter-sdk-4dd2</guid>
      <description>&lt;p&gt;So, this was a fun experience submitting my first &lt;a href="https://github.com/flutter/flutter/pull/49148"&gt;PR&lt;/a&gt; of the year and it was very small, not going to lie. I've dabbled with supporting open source projects from time to time, but I've never submitted a feature patch to a repo as big as the &lt;a href="https://github.com/flutter/flutter/"&gt;Flutter SDK&lt;/a&gt;. Let alone anything tied to Google.&lt;/p&gt;

&lt;p&gt;It was definitely an experience, because I don't have that much experience with the testing library. There's a lot that I feel is undocumented and the testing library is actually cool as hell. The google flutter dev that assigned themselves to my repo showed me that you can actually drag the ui from the testing lib and find specific things within the screen view and actually detect if you've properly hit a specific widget. That level of integration testing is fascinating and honestly I hope someone writes more on it because there's just so much I want to understand from the testing library. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;(All the testing code is credited to Shi-Hao)&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;customController&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;animateTo&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;
    &lt;span class="mf"&gt;40.0&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;duration:&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;Duration&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;milliseconds:&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="o"&gt;),&lt;/span&gt;
    &lt;span class="nl"&gt;curve:&lt;/span&gt; &lt;span class="n"&gt;Curves&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;linear&lt;/span&gt;
&lt;span class="o"&gt;);&lt;/span&gt;

&lt;span class="n"&gt;await&lt;/span&gt; &lt;span class="n"&gt;tester&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;pumpAndSettle&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
&lt;span class="n"&gt;Offset&lt;/span&gt; &lt;span class="n"&gt;listViewTopLeft&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;tester&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getTopLeft&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;find&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;byType&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ReorderableListView&lt;/span&gt;&lt;span class="o"&gt;),&lt;/span&gt;
&lt;span class="o"&gt;);&lt;/span&gt;

&lt;span class="n"&gt;Offset&lt;/span&gt; &lt;span class="n"&gt;firstBoxTopLeft&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;tester&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getTopLeft&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;find&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;byKey&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;firstBox&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;);&lt;/span&gt;

&lt;span class="n"&gt;expect&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;firstBoxTopLeft&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;dy&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;listViewTopLeft&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;dy&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mf"&gt;40.0&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;I'm definitely used to simple unit tests, that's easy, but integration tests for actually testing how the the UI responds and works as intended is very cool and there's just so much to learn.&lt;/p&gt;

&lt;p&gt;As for the PR I added, &lt;a href="https://api.flutter.dev/flutter/material/ReorderableListView-class.html"&gt;&lt;code&gt;ReorderableListView&lt;/code&gt;&lt;/a&gt; didn't expose the scroll controller like the ListView builder did. So you were forced to wrap it in a &lt;a href="https://api.flutter.dev/flutter/widgets/PrimaryScrollController-class.html"&gt;&lt;code&gt;PrimaryScrollController&lt;/code&gt;&lt;/a&gt; to pass your own scroll controller which seemed like a tedious step. So I decided this would be my chance to hit one of my goals this year, which was to contribute more to open source and damn was this a big first step starting with this PR.&lt;/p&gt;

&lt;p&gt;Now whenever this gets added, I'll be able to use one of my favorite packages called &lt;a href="https://pub.dev/packages/flutter_speed_dial"&gt;&lt;strong&gt;Flutter Speed Dial&lt;/strong&gt;&lt;/a&gt; without a &lt;code&gt;PrimaryScrollController&lt;/code&gt; that allows me to auto hide the dial visibility when I move the scroll view. :)&lt;/p&gt;

&lt;p&gt;This was definitely an intimidating PR because of the people behind it, but damn if I can do it so can you :)!&lt;/p&gt;

</description>
      <category>dart</category>
      <category>flutter</category>
    </item>
  </channel>
</rss>
