Flutter Day- Recap
Tags: flutter, dart, webdev, productivity
Published: 2020-06-26 18:07:21

<!-- wp:paragraph -->
<p><strong>Disclaimer: This recap, is based upon my perspective, and does not serve as a replacement for the Flutter Day…:) Enjoy</strong></p>
<!-- /wp:paragraph -->

*In case it helped :)*
<a href="https://www.buymeacoffee.com/aseemwangoo" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Pass Me A Coffee!!" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a>

####Article here: https://flatteredwithflutter.com/flutter-day-recap/

<p><strong>FlutterHack20 submission</strong></p>

{% youtube 2H3w0VT5J50 %}

<!-- wp:quote -->
<blockquote class="wp-block-quote"><p><strong>Team Signature</strong></p></blockquote>
<!-- /wp:quote -->

<!-- wp:list -->
<ul><li><a rel="noreferrer noopener" href="https://github.com/lustea00" target="_blank"><strong>Ahmad</strong></a></li><li><a rel="noreferrer noopener" href="https://github.com/SalocinDotTEN" target="_blank"><strong>Nicolas Y.</strong></a></li><li><a rel="noreferrer noopener" href="https://medium.com/u/ec48ee438029?source=post_page-----e1a93f63089b----------------------" target="_blank"><strong>Sanjay Soni</strong></a></li></ul>
<!-- /wp:list -->

<!-- wp:heading {"level":3} -->
<h3>Overview</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>What is Flutter Day?</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Flutter Day is a 24-hour online educational event on Flutter with <a rel="noreferrer noopener" href="https://events.withgoogle.com/flutter-day/codelabs/" target="_blank">code labs</a>, 3 live stream sessions, and a Q&amp;A hosted by the official Flutter team!</p>
<!-- /wp:paragraph -->

<!-- wp:quote -->
<blockquote class="wp-block-quote"><p><a href="https://events.withgoogle.com/flutter-day/#content" rel="noreferrer noopener" target="_blank">Read more on their official website</a></p></blockquote>
<!-- /wp:quote -->

<!-- wp:heading {"level":4} -->
<h4>Schedule…</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>There were a total of 3 schedules :</p>
<!-- /wp:paragraph -->

<!-- wp:image -->
<figure class="wp-block-image"><img src="https://cdn-images-1.medium.com/max/1600/1*RXgsFsx89ICUL0g0qEaacw.png" alt="Flutter Day Schedule"/><figcaption>Flutter Day Schedule</figcaption></figure>
<!-- /wp:image -->

<!-- wp:heading {"level":4} -->
<h4>Session #1: Building beautiful UIs (Flutter Day)</h4>
<!-- /wp:heading -->

{% youtube xg4S67ZvsRs %}

<!-- wp:paragraph -->
<p>Part 1: <em>Welcome</em></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><em>Andrew Fitz Gibbon gives an intro</em> <strong>What is Flutter Day? And what are we doing on your screen today? </strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Part 2: <em>Building beautiful UIs with Flutter and CodePen</em></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><em>Zoey Fan, Alex Vazquez, and Mariano Zorrilla go through </em><a rel="noreferrer noopener" href="https://codepen.io/" target="_blank"><em>codepen</em></a><em> and the interesting works there…</em></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Part 3: <em>#AskFlutter: UI &amp; Design (Andrew Fitz Gibbon and John Ryan)</em></p>
<!-- /wp:paragraph -->

<!-- wp:image -->
<figure class="wp-block-image"><img src="https://cdn-images-1.medium.com/max/1600/1*MGZ23iwd1nuouibCC-_-xg.jpeg" alt="Part 1 (Q&amp;A) UI &amp; Design….. Flutter Day Recap"/><figcaption>Part 1 (Q&amp;A) UI &amp; Design…..</figcaption></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p><strong>Q: Options regarding the online development of Flutter Apps?</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A: Dartpad, codepen, maybe (VSCode online)</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Q: State Management Recommendation<strong>?</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A: <a rel="noreferrer noopener" href="https://pub.dev/packages/provider" target="_blank">Provider</a>, as per John</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Q: How to scale a Flutter Website for mobile and desktop?</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A: Use MediaQuery, to know the size of the screen you are showing</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li>Use LayoutBuilder, to provide a callback for the incoming constraints</li></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p><strong>Q: Things to know as a Senior Flutter Developer?</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A: If you have an app shipped to the play/app stores and you got users, then you are on the right track.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Q: Options regarding the online development of Flutter Apps?</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A: Dartpad, codepen, maybe (VSCode online)</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Q: State Management Recommendation<strong>?</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A: <a rel="noreferrer noopener" href="https://pub.dev/packages/provider" target="_blank">Provider</a>, as per John</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Q: How to scale a Flutter Website for mobile and desktop?</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A: Use MediaQuery, to know the size of the screen you are showing</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li>Use LayoutBuilder, to provide a callback for the incoming constraints</li></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p><strong>Q: Things to know as a Senior Flutter Developer?</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A: If you have an app shipped to the play/app stores and you got users, then you are on the right track.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Session #2: Flutter DevTools</p>
<!-- /wp:paragraph -->

{% youtube cG1VDcCwOLE %}

<!-- wp:paragraph -->
<p>Part 1: <em>Flutter DevTools by Filip Hracek and Kenzie Schmoll</em></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>DartDev Tools Intro&nbsp;:</strong></p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li>Tooling suite for Flutter and Dart Devs consisting of — layout inspection tools, performance tools, memory tools, etc</li></ul>
<!-- /wp:list -->

<!-- wp:image -->
<figure class="wp-block-image"><img src="https://cdn-images-1.medium.com/max/1600/1*PFoSuMFoU6Jc_0JT0_5tAQ.png" alt="Dart Dev Tools  Flutter Day Recap"/><figcaption>Dart Dev Tools</figcaption></figure>
<!-- /wp:image -->

<!-- wp:list -->
<ul><li>DartDev Tools rewritten in Flutter adding some new features to it</li><li>Use <strong>LayoutExplorer</strong> for UI specific issues (render flow errors like in the image below)</li></ul>
<!-- /wp:list -->

<!-- wp:image -->
<figure class="wp-block-image"><img src="https://cdn-images-1.medium.com/max/1600/1*GjsxmJAm64mGSADIdwyH_w.png" alt="LayoutExplorer in DartDevTools  Flutter Day Recap"/><figcaption>LayoutExplorer in DartDevTools</figcaption></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>Note: Text is not flexible by default unless you put it inside Expanded / Flexible…</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li>To find spikes in performance overlay, use the <strong>Timeline</strong> feature of DevTools</li></ul>
<!-- /wp:list -->

<!-- wp:image -->
<figure class="wp-block-image"><img src="https://cdn-images-1.medium.com/max/1600/1*QdOClePfKKCFTM8VVrVbRA.png" alt="Timeline in DartDevTools… Flutter Day Recap"/><figcaption>Timeline in DartDevTools…</figcaption></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>There is an option called <strong>Track Widget Builds</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>When we receive events from the Flutter Framework, it sends these events to the DartDev Tools to see what specific widgets took more than usual time for built….</p>
<!-- /wp:paragraph -->

<!-- wp:quote -->
<blockquote class="wp-block-quote"><p><strong>Note: Track Widget Builds is disabled by default…This is because</strong></p></blockquote>
<!-- /wp:quote -->

<!-- wp:list {"ordered":true} -->
<ol><li>It takes a lot of resources</li><li>It makes profile build apps slower</li></ol>
<!-- /wp:list -->

<!-- wp:list -->
<ul><li>For looking across multiple frames of the app, use the <strong>record</strong> option under Performance…</li></ul>
<!-- /wp:list -->

<!-- wp:image -->
<figure class="wp-block-image"><img src="https://cdn-images-1.medium.com/max/1600/1*LCOuQXTF1nRMSvAB0YKLbg.png" alt="Record in DartDevTools… Flutter Day Recap"/><figcaption>Record in DartDevTools…</figcaption></figure>
<!-- /wp:image -->

<!-- wp:quote -->
<blockquote class="wp-block-quote"><p><strong>Tip: Use isolates to take off computational intensive tasks from the main thread…</strong></p></blockquote>
<!-- /wp:quote -->

<!-- wp:list -->
<ul><li><strong>Memory tool</strong> for inspecting Dart Memory and Android Memory</li></ul>
<!-- /wp:list -->

<!-- wp:image -->
<figure class="wp-block-image"><img src="https://cdn-images-1.medium.com/max/1600/1*95O7VTzT4OxXKwZabCYpLA.png" alt="Memory in DartDevTools…. Flutter Day Recap"/><figcaption>Memory in DartDevTools….</figcaption></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>Network tool for inspecting all the HTTP requests…</p>
<!-- /wp:paragraph -->

<!-- wp:image -->
<figure class="wp-block-image"><img src="https://cdn-images-1.medium.com/max/1600/1*inNFuRagCy8W4S9UmlYF3Q.png" alt="Network in DartDevTools…."/><figcaption>Network in DartDevTools….</figcaption></figure>
<!-- /wp:image -->

<!-- wp:list -->
<ul><li>Full source-level <strong>debugger</strong> inside DartDevTools</li><li><strong>Logging Tool</strong> that listens to the logs coming in the app, whether they are GC events or regular console logs…</li></ul>
<!-- /wp:list -->

<!-- wp:image -->
<figure class="wp-block-image"><img src="https://cdn-images-1.medium.com/max/1600/1*_M0Yo6zM2oYLjNdi1SGJ3Q.png" alt="Logging in DartDevTools.."/><figcaption>Logging in DartDevTools</figcaption></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p><strong><em>Tip: You can do a negative filter, for instance, -gc, all the logs with gc are removed</em></strong></p>
<!-- /wp:paragraph -->

<!-- wp:quote -->
<blockquote class="wp-block-quote"><p>For more info, visit <a href="https://flutter.dev/docs/development/tools/devtools/overview" rel="noreferrer noopener" target="_blank">here</a>.</p></blockquote>
<!-- /wp:quote -->

<!-- wp:paragraph -->
<p>Part 2: <em>#AskFlutter: Flutter DevTools (Andrew Fitz Gibbon, Filip Hracek, and Kenzie Schmoll)</em></p>
<!-- /wp:paragraph -->

<!-- wp:image -->
<figure class="wp-block-image"><img src="https://cdn-images-1.medium.com/max/1600/1*zKnuJtDXNJMaT8a8EiC5uA.jpeg" alt="Part2 - Q&amp;A (DartDev Tools)"/><figcaption>Part2 — Q&amp;A (DartDev Tools)</figcaption></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p><strong>Q: How to boost the performance for Flutter Web projects?</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A: Use a CanvasKit enabled build</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>By default, Flutter’s web support uses DomCanvas, but you can enable the CanvasKit rendering engine with this command:</p>
<!-- /wp:paragraph -->

<!-- wp:preformatted -->
<pre class="wp-block-preformatted">flutter run -d chrome --release <br>            --dart-define=FLUTTER_WEB_USE_SKIA=true</pre>
<!-- /wp:preformatted -->

<!-- wp:paragraph -->
<p>One word of caution: the CanvasKit engine still has a few rough edges; for early adopters who are putting Flutter into production, the DomCanvas engine offers the greatest stability.</p>
<!-- /wp:paragraph -->

<!-- wp:quote -->
<blockquote class="wp-block-quote"><p><strong>CanvasKit: Skia running on Web browser through web assembly…</strong></p></blockquote>
<!-- /wp:quote -->

<!-- wp:paragraph -->
<p>Expect Flutter to run slower on Web, due to overheads. Make your apps a little less complex, if you don’t need some animations or shadows, omitting them is a good option…</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Q: How do we check code coverage of tests?</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A: There is some coverage option&nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>flutter test --coverage</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>This generates a lcov file and you can observe the code coverage graphs. But this does not happen automatically for tests.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Q: Difference between Expanded and Flexible?</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A: Expanded is flexible with a flex of 1 by default and forces a child to fill up the available space.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Flexible gives the option of setting flex and does not force a child for filling space.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Q: Can we have a Widget Size inspector inside DartDevTools?</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A: Depends on the priority. Raise PR.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Q: How to speed up a shadow or raster heavy apps?</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A: Shadows are performance intensive. You can cache the shadow if it's not changing, avoid computing the shadow over every frame.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Q: How to implement the changes made in LayoutExplorer (DartDevTools) in the code?</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A: In case of changes to cross-axis alignments or flexes you can fiddle inside the explorer…However, in the future, the team would like to revamp the LayoutExplorer, which may have a button to apply changes to the code.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Q: How to reduce the app size in the release?</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A: The team is building a code size debugging tool, and will be adding to DartDevTools. You will be able to look at the compiled AOT or a snapshot from the AOT compiler, analyze the size of packages inside your application, what were the things included when you integrated the package, and to make a better decision.</p>
<!-- /wp:paragraph -->

<!-- wp:quote -->
<blockquote class="wp-block-quote"><p><strong>Note: Currently Flutter app is at 6.5 Mb, (no matter what)</strong></p></blockquote>
<!-- /wp:quote -->

<!-- wp:paragraph -->
<p>In some cases, the size comes from the assets. Flutter has support for flavors, so maybe you can target the assets based on the flavors.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Q: State management in 2020?</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A: DartDevTools utilizes Provider package for passing down models etc. In addition to it, they also use <a href="https://api.flutter.dev/flutter/foundation/ValueNotifier-class.html" rel="noreferrer noopener" target="_blank"><strong>ValueNotifiers</strong></a>, <a href="https://api.flutter.dev/flutter/widgets/ValueListenableBuilder-class.html" rel="noreferrer noopener" target="_blank"><strong>ValueListenableBuilder</strong></a></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Consider using Provider and in general, not a good idea to be direct, since there are different types of apps, needing different data structures or data saving techniques</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Q: PWA vs Flutter?</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A: Both, since Flutter can do a PWA. Also best use of Flutter for Web, right now is, let's say you need to provide a part of your app on the web, you can do with Flutter for Web.</p>
<!-- /wp:paragraph -->

{% youtube ZxSyZHq8gUg %}

<!-- wp:paragraph -->
<p>Part 1: <em>Null safety in Dart</em> by <em>Bob Nystrom and Kevin Moore</em></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Goals:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li>To avoid null references, instead, push them to compile time.</li><li>Smaller and faster code, as there would be no additional code for null checks.</li></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>Overview:</p>
<!-- /wp:paragraph -->

<!-- wp:image -->
<figure class="wp-block-image"><img src="https://cdn-images-1.medium.com/max/1600/1*6AzdBYJS2fw6gIzNo41CyQ.png" alt="Null safety in Dart"/><figcaption>Null safety in Dart</figcaption></figure>
<!-- /wp:image -->

<!-- wp:list -->
<ul><li>If you try to put&nbsp;</li></ul>
<!-- /wp:list -->

<!-- wp:code -->
<pre class="wp-block-code"><code>serveCoffee(null) // it will give you compile time warning</code></pre>
<!-- /wp:code -->

<!-- wp:list -->
<ul><li>In case you want to allow null, you can use a question mark (?) </li></ul>
<!-- /wp:list -->

<!-- wp:code -->
<pre class="wp-block-code"><code>String serveCoffee(String? temp) {}</code></pre>
<!-- /wp:code -->

<!-- wp:list -->
<ul><li>In case you want to opt-out of the compile-time check, and have at runtime instead, use</li></ul>
<!-- /wp:list -->

<!-- wp:preformatted -->
<pre class="wp-block-preformatted">! (bang operator)</pre>
<!-- /wp:preformatted -->

<!-- wp:preformatted -->
<pre class="wp-block-preformatted">//<br>return temp! + 'coffee';</pre>
<!-- /wp:preformatted -->

<!-- wp:list -->
<ul><li>Introduction of late keyword</li></ul>
<!-- /wp:list -->

<!-- wp:preformatted -->
<pre class="wp-block-preformatted">late String temp;</pre>
<!-- /wp:preformatted -->

<!-- wp:paragraph -->
<p>Instead of checking the property statically, check at runtime.</p>
<!-- /wp:paragraph -->

<!-- wp:quote -->
<blockquote class="wp-block-quote"><p>For more info on null safety, <a href="https://dart.dev/null-safety" rel="noreferrer noopener" target="_blank">check this</a>.</p></blockquote>
<!-- /wp:quote -->

<!-- wp:paragraph -->
<p>Part 2: <em>#AskFlutter: Dart (Andrew Fitz Gibbon, John Ryan, and Michael Thomsen)</em></p>
<!-- /wp:paragraph -->

<!-- wp:image -->
<figure class="wp-block-image"><img src="https://cdn-images-1.medium.com/max/1600/1*8BkiM_aBWIMkjdumrcGZLg.jpeg" alt="Part2 - Q&amp;A (Dart)"/><figcaption>Part2 — Q&amp;A (<em>Dart</em>)</figcaption></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p><strong>Q: What is the next big feature for dart (after null safety)?</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A: There is a range of features. Dart team has a great pool of ideas (including community ones). There are brainstorming sessions, prototypes, and at some point implementation.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Dart, as an open-source language, has a language funnel in its repo. Check out <a rel="noreferrer noopener" href="https://github.com/dart-lang/language/projects/1" target="_blank">here</a>. You can track the features of the language funnel.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Q: Does the AOT compiler perform tree-shaking?</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A: All the iOS or Android written in Flutter has tree-shaking. So all the unused code is definitely removed.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Flutter only takes whatever it wants, even in the cases of platform-specific plugins.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Q: Will the new keyword be removed?</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A: No plans to remove new for now.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Q: Why does dart don’t have multi-threading?</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A: When dart was designed, we didn’t want to bring complexity to it. Multi-threading is a complex topic itself in ComputerScience. But dart supports isolates.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p> The growing use case of Flutter is do work in the background, while the UI runs smoothly, and when the background process is finished, hand over the data back to UI, which is tricky using isolates. The team hopes to do something in this area.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Q: Can dart be used for the backend? Is dart flutter only?</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A: Dart is a fully-fledged programming model. You can do dart with backend. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Some of the packages using dart as backend include <a rel="noreferrer noopener" href="https://pub.dev/packages/aqueduct" target="_blank">Aqueduct</a>, <a rel="noreferrer noopener" href="https://pub.dev/packages/shell" target="_blank">Shell</a></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Q: How to use Dart as a controller for Arduino or RaspberryPi?</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A: Using gRPC or Http. Recently, dart announced ffi (Foreign Function Interface) which can be used</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li>To call O.S level APIs</li></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p><strong>Q: When will we get a data class like features (rich enums or sealed data classes)?</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A: You can do data classes or sealing or a combination of both. This is one of the hard parts, but this is definitely an area of interest</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Q: Is there a way to cache the result from an expensive function?</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A: You can create a private field, for the most recent result, inside your dart class. Also, look up inside the flutter packages, if someone has already solved something similar.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>For instance, there is a <a rel="noreferrer noopener" href="https://pub.dev/packages/cached_network_image" target="_blank"><strong>package</strong></a> available for the caching of network images. There is an <a rel="noreferrer noopener" href="https://pub.dev/packages/async" target="_blank">async package,</a> that has AsyncCache for caching expensive asynchronous computations.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Q: Why is String capitalized, whereas int, nums, etc aren’t?</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A: It’s a mystery.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Q: How to do function comparison in dart?</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A: Function comparison was not supported initially, but now it’s there. You can compare top-level functions and static functions.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Q: Why are there still chances of runtime exceptions after null safety?</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A: There are basically two cases of apps:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li>Apps with null safety: In these apps, if you have powerful features like bang operator.</li><li>Apps with multiple dependencies: Some packages used were not programmed with null safety or some packages haven’t enabled null safety</li></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p><strong>Q: Will there be a destructor for classes?</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A: Currently, there are no destructors. It relates to how the garbage collector works. For having high performant apps, Flutter customizes the garbage collector tool.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>But this can be useful in some cases like ffi feature. Expect to see in such cases in the future.&nbsp;</p>
<!-- /wp:paragraph -->

*In case it helped :)*
<a href="https://www.buymeacoffee.com/aseemwangoo" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Pass Me A Coffee!!" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a>

https://www.youtube.com/aseemwangoo
Article here: https://flatteredwithflutter.com/flutter-day-recap/