<?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 Jose Alba on Medium]]></title>
        <description><![CDATA[Stories by Jose Alba on Medium]]></description>
        <link>https://medium.com/@josealba199675?source=rss-a8e501ba3326------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*hPHb0U1EVsdSI-ZK</url>
            <title>Stories by Jose Alba on Medium</title>
            <link>https://medium.com/@josealba199675?source=rss-a8e501ba3326------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 05:27:47 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@josealba199675/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[Handling Web Gestures in Flutter]]></title>
            <link>https://blog.flutter.dev/handling-web-gestures-in-flutter-e16946a04745?source=rss-a8e501ba3326------2</link>
            <guid isPermaLink="false">https://medium.com/p/e16946a04745</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[gestures]]></category>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[announcements]]></category>
            <dc:creator><![CDATA[Jose Alba]]></dc:creator>
            <pubDate>Mon, 21 Sep 2020 13:31:40 GMT</pubDate>
            <atom:updated>2020-09-21T13:31:40.974Z</atom:updated>
            <content:encoded><![CDATA[<h3>Handling web gestures in Flutter</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BzcKF4qdbLIFFB6XL8x-9A.png" /></figure><p>Flutter has released web support that allows you to create dynamic websites. With Flutter web, MacOS, Linux, and Windows operating systems (even on mobile devices connected to a mouse, keyboard, or other peripherals), you now have access to platform-specific behaviors including focus support, keyboard input, custom mouse cursors, and hover input. But, how do you make use of these platform behaviors in Flutter?</p><p>This article explains how to use the FocusableActionDetector widget, which handles keyboard input, focus input, hover input, and custom mouse cursors.</p><h3>How to use the Focusable Action Detector widget</h3><p>The Focusable Action Detector widget allows you to handles several web-specific actions, including:</p><ol><li>Keyboard input</li><li>Focus input</li><li>Hover input</li><li>Custom mouse cursors</li></ol><p>See the FocusableActionDetector in action in the <a href="https://dartpad.dev/d16345202d0e26d40fe14904657dc24a">DartPad #1</a> example.</p><blockquote><strong>Note</strong>: This article uses two DartPad examples, though there are multiple links to each. <a href="https://dartpad.dev/d16345202d0e26d40fe14904657dc24a">DartPad #1</a> shows the FocusableActionDetector sample, and <a href="https://dartpad.dev/5544c57e20454fe212e3ec5cf10b1f0a">DartPad #2</a> demonstrates hover and focus support for FocusableActionDetector.</blockquote><h3>Keyboard input</h3><p>Flutter lets you define custom actions to handle keyboard input. Let’s say you want to have a hidden menu or your application has to handle a lot of custom keyboard input. This is easy to achieve with the FocusableActionDetector widget.</p><p>First, add the following import:</p><p>import ‘package:flutter/services.dart’;</p><p>Next, from the class where the FocusableActionDetector is called, initialize two private variables. These variables map the keyboard input to the desired action:</p><pre>Map&lt;LogicalKeySet, Intent&gt; _shortcutMap;</pre><pre>Map&lt;Type, Action&lt;Intent&gt;&gt; _actionMap;</pre><p>Define a FocusableActionDetector widget. Note that the custom keyboard input activates only when the child widget is in focus:</p><pre>FocusableActionDetector(</pre><pre>  actions: _actionMap,</pre><pre>  shortcuts: _shortcutMap,</pre><pre>  child:</pre><pre>)</pre><p>This class maps the enums and keyboard input type to the Intent class. The following setup is necessary because the actions and shortcuts parameter requires a class that extends Intent:</p><pre>class _ShowSecretMessageIntent extends Intent {</pre><pre>  const _ShowSecretMessageIntent({@required this.type});</pre><pre>  const _ShowSecretMessageIntent.P() : type = _SecretMessageType.P;</pre><pre>  const _ShowSecretMessageIntent.L() : type = _SecretMessageType.L;</pre><pre>  const _ShowSecretMessageIntent.A() : type = _SecretMessageType.A;</pre><pre>  const _ShowSecretMessageIntent.T() : type = _SecretMessageType.T;</pre><pre>  const _ShowSecretMessageIntent.F() : type = _SecretMessageType.F;</pre><pre>  const _ShowSecretMessageIntent.O() : type = _SecretMessageType.O;</pre><pre>  const _ShowSecretMessageIntent.R() : type = _SecretMessageType.R;</pre><pre>  const _ShowSecretMessageIntent.M() : type = _SecretMessageType.M;</pre><pre>  final _SecretMessageType type;</pre><pre>}</pre><pre>enum _SecretMessageType {</pre><pre>  P,</pre><pre>  L,</pre><pre>  A,</pre><pre>  T,</pre><pre>  F,</pre><pre>  O,</pre><pre>  R,</pre><pre>  M,</pre><pre>}</pre><p>Within the initState method, initialize the mapping previously defined:</p><pre>void initState() {</pre><pre>  _shortcutMap = &lt;LogicalKeySet, Intent&gt;{</pre><pre>    LogicalKeySet(LogicalKeyboardKey.keyP):</pre><pre>      const _ShowSecretMessageIntent.P(),</pre><pre>    LogicalKeySet(LogicalKeyboardKey.keyL):</pre><pre>      const _ShowSecretMessageIntent.L(),</pre><pre>    LogicalKeySet(LogicalKeyboardKey.keyA):</pre><pre>      const _ShowSecretMessageIntent.A(),</pre><pre>    LogicalKeySet(LogicalKeyboardKey.keyT):</pre><pre>      const _ShowSecretMessageIntent.T(),</pre><pre>    LogicalKeySet(LogicalKeyboardKey.keyF):</pre><pre>      const _ShowSecretMessageIntent.F(),</pre><pre>    LogicalKeySet(LogicalKeyboardKey.keyO):</pre><pre>      const _ShowSecretMessageIntent.O(),</pre><pre>    LogicalKeySet(LogicalKeyboardKey.keyR):</pre><pre>      const _ShowSecretMessageIntent.R(),</pre><pre>    LogicalKeySet(LogicalKeyboardKey.keyM):</pre><pre>      const _ShowSecretMessageIntent.M(),</pre><pre>    };</pre><pre>  _actionMap = &lt;Type, Action&lt;Intent&gt;&gt;{</pre><pre>    _ShowSecretMessageIntent: CallbackAction&lt;_ShowSecretMessageIntent&gt;(</pre><pre>      onInvoke: _actionHandler,</pre><pre>    ),</pre><pre>  };</pre><pre>}</pre><p>The action handler links the keyboard input to a certain function within the application. Any time a character is pressed, an expanded container is added to the main part of the application. But in your application, you can use it for more creative purposes:</p><pre>void _actionHandler(_ShowSecretMessageIntent intent) {</pre><pre>  switch (intent.type) {</pre><pre>    case _SecretMessageType.P:</pre><pre>      setState(() {</pre><pre>        children.add(</pre><pre>          Expanded(</pre><pre>            child: Container(</pre><pre>              color: Colors.orange,</pre><pre>              child: Text(‘Press L’),</pre><pre>            ),</pre><pre>          ),</pre><pre>        );</pre><pre>      });</pre><pre>    break;</pre><pre>    …</pre><pre>  }</pre><pre>}</pre><h3>Focus input</h3><p>The FocusableActionDetector widget lets you perform action calls any time the specified widget is in focus.</p><p>The focus tree allows you to navigate through your application using the tab key. This allows people with visual impairment to navigate through your website.</p><p>The FocusableActionDetector child widget is selected as the initial focus when no other node in its scope is currently focused. It’s important to set the autofocus parameter variable to true if you want your custom keyboard input to work regardless of whether your child widget has focus or not. This is because, by default, this FocusableActionDetector widget won’t be in focus, hence you won’t be able to use custom keyboard inputs:</p><pre>FocusableActionDetector(</pre><pre>  autofocus: true,</pre><pre>  child : …</pre><pre>),</pre><p>Let’s say you want your child widget to have a different color when focused to identify that this widget is currently in focus. If you need to set custom actions whenever your widget has focus, use the onShowFocusHighlight property.</p><p>The <a href="https://dartpad.dev/5544c57e20454fe212e3ec5cf10b1f0a">DartPad #2</a> example shows how to use the onShowFocusHighlight property.</p><p>Focus is an advanced topic. Learn more about focus by reading the API docs for the <a href="https://api.flutter.dev/flutter/widgets/Focus-class.html">Focus</a> class</p><h3>Hover input</h3><p>The FocusableActionDetector widget lets you handle hover input. That way, anytime a cursor hovers over a certain widget, custom actions can happen. Similar to the onShowFocusHighlight property, the onShowHoverHighlight property lets you create custom actions anytime the mouse cursor hovers over a certain widget.</p><p>Check out the <a href="https://dartpad.dev/5544c57e20454fe212e3ec5cf10b1f0a">DartPad #2</a> example, which demonstrates how to implement custom hover and focus action.</p><p>In the <a href="https://dartpad.dev/5544c57e20454fe212e3ec5cf10b1f0a">DartPad #2</a> example, anytime the mouse hovers over the widget it changes the color of the widget. If you are navigating the application using tab, then you’ll notice that the widget in focus applies a different shade to the widget compared to the widget that is currently being hovered over.</p><p>This means you can have different custom actions anytime the widget is in focus or a mouse cursor hovers over that widget. You can tell this if you hover and focus over on the same widget. That widget is applying two shades at the same time to that widget. For more information, see the API docs for the <a href="https://api.flutter.dev/flutter/widgets/FocusableActionDetector-class.html">FocusableActionDetector</a> class.</p><h3>Custom mouse cursors</h3><p>The FocusableActionDetector widget lets you implement custom mouse cursors. For example, if you want your users to know that a widget is draggable, changing the mouse cursor is a good indicator that you can do this. The FocusableActionDetector widget has a mouseCursor parameter.</p><p>mouseCursor: SystemMouseCursors.grabbing</p><p>The <a href="https://dartpad.dev/d16345202d0e26d40fe14904657dc24a">DartPad #1</a> example demonstrates the different types of mouse cursors within Flutter. Click any of the icons in the app bar to try. There are nine different system default mouse cursors:</p><ol><li>SystemMouseCursors.basic</li><li>SystemMouseCursors.text</li><li>SystemMouseCursors.click</li><li>SystemMouseCursors.forbidden</li><li>SystemMouseCursors.grab</li><li>SystemMouseCursors.grabbing</li><li>SystemMouseCursors.horizontalDoubleArrow (not in stable)</li><li>SystemMouseCursors.verticalDoubleArrow (not in stable)</li><li>SystemMouseCursors.none</li></ol><h3>Closing remarks</h3><p>In Flutter you have access to web-specific APIs. The FocusableActionDetector widget lets you handle web-specific functions in Flutter. To learn more about Flutter web, see the Medium post, <a href="https://medium.com/flutter/handling-404-page-not-found-error-in-flutter-731f5a9fba29">Handling 404: Page not found error in Flutter</a>.</p><p><em>About the author: Jose recently graduated from university and now works on </em><a href="https://material.io/"><em>Material</em></a><em>, a design system that helps teams build high-quality digital experiences. Jose’s team maintains the Flutter </em><a href="https://api.flutter.dev/flutter/material/material-library.html"><em>material library</em></a><em>. To learn more, visit his Jose’s pages on </em><a href="https://github.com/JoseAlba"><em>GitHub</em></a><em>, </em><a href="https://www.linkedin.com/in/josealba1996/"><em>LinkedIn</em></a><em>, </em><a href="https://www.youtube.com/channel/UCOdKA_On0oPe1tz02z1QfxA?view_as=subscriber"><em>YouTube</em></a><em>, and </em><a href="https://www.instagram.com/jose.alba/"><em>Instagram</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e16946a04745" width="1" height="1" alt=""><hr><p><a href="https://blog.flutter.dev/handling-web-gestures-in-flutter-e16946a04745">Handling Web Gestures in Flutter</a> was originally published in <a href="https://blog.flutter.dev/">Flutter</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dart Code Viewer]]></title>
            <link>https://medium.com/swlh/dart-code-viewer-59e120a47166?source=rss-a8e501ba3326------2</link>
            <guid isPermaLink="false">https://medium.com/p/59e120a47166</guid>
            <category><![CDATA[flutter-widget]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Jose Alba]]></dc:creator>
            <pubDate>Wed, 19 Aug 2020 13:11:24 GMT</pubDate>
            <atom:updated>2020-09-07T12:10:43.496Z</atom:updated>
            <content:encoded><![CDATA[<h3>Dart Code Viewer Flutter package</h3><p>The dart_code_viewer package for Flutter allows you to easily show and copy dart code in your Flutter application.</p><h3>Getting Started</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/372/0*BPNbRIFNYbu5Bgjz" /></figure><p>With the dart_code_viewer package, you can show Dart code in a Flutter application. The dart_code_viewer is well documented and has the same theming pattern that the Flutter framework has.</p><p>The code viewer can be used to display dart code. By default the DartCodeViewer gives you a theme based code view. This means that the code viewer has two different default theming , light and dark mode.</p><p>The code viewer requires a non-null data String as required input.</p><p>The DartCodeViewer requires one of its ancestors to be a Material widget. This is because the code viewer uses the MediaQuery widget. Which is typically introduced by the MaterialApp or WidgetsApp widget at the top of your application widget tree.</p><p>To use dart_code_viewer first you must add the ‘dart_code_viewer’ package to your <a href="https://pub.dev/packages/dart_code_viewer#-installing-tab-">pubspec dependencies</a>.</p><p>To import DartCodeViewer:</p><pre>import ‘package:dart_code_viewer/dart_code_viewer.dart’;</pre><p>To use DartCodeViewer with the default DartCodeViewer:</p><pre>DartCodeViewer(r’’’</pre><pre>void main() {</pre><pre>runApp(MyApp());</pre><pre>}</pre><pre>‘’’</pre><pre>),</pre><p>Note: ‘’’ is a handy dart pattern that lets you write multiple strings in different lines. This is really useful if you want to import your dart code as a String like the example above.</p><p>You can also customize the theming of the DartCodeViewer by using its parameters:</p><pre>DartCodeViewer(r’’’</pre><pre>void main() {</pre><pre>runApp(MyApp());</pre><pre>}</pre><pre>‘’’,</pre><pre>backgroundColor: GoogleFonts.robotoMono().copyWith(color: Colors.pink),</pre><pre>),</pre><p>This will change the background color of the CodeViewer to Pink.</p><p>You can use this <a href="https://romannurik.github.io/SlidesCodeHighlighter/">Code viewer tool</a> to choose the color for each different highlighted token style. On the left side you put your example code and on the right you can choose the colors you want the code viewer to display. Below is a table that shows you the difference between the code viewer tool and the dart code viewer parameter.</p><p><strong>Code Viewer Tool =&gt; Dart Code Viewer Parameter</strong></p><p>background =&gt; backgroundColor</p><p>plain text =&gt; baseStyle</p><p>Punctuation =&gt; punctuationStyle</p><p>String, values =&gt; stringStyle</p><p>Keywords, tags =&gt; keywordStyle</p><p>Comment =&gt; commentStyle</p><p>Types =&gt; classStyle</p><p>Numbers =&gt; numberStyle</p><p>You can use DartCodeViewer other constructor DartCodeViewer.textColor to change the color properties instead of the TextStyles. You can also set the TextStyle in case you don’t want to use the default textStyle RobotoMono. Here is an example on how you can use this constructor:</p><pre>DartCodeViewer.textColor(r’’’</pre><pre>void main() {</pre><pre>runApp(MyApp());</pre><pre>}</pre><pre>‘’’,</pre><pre>  textStyle: GoogleFonts.lato(),</pre><pre>  commentColor: Colors.grey,</pre><pre>  baseColor: Colors.pink,</pre><pre>),</pre><p>In the case above we are using the text style lato and we are changing the default colors for comment and base color to grey and pink respectively.</p><p>If you are having a hard time figuring out how to choose the Color for this tool. There are a few default DartCodeViewers at your disposal. Here are the code viewers that are well known:</p><p>- DartCodeViewer.light</p><p>- DartCodeViewer.lightAlt</p><p>- DartCodeViewer.dark</p><p>- DartCodeViewer.darkAlt</p><p>- DartCodeViewer.designDark</p><p>- DartCodeViewer.io17</p><p>- DartCodeViewer.io19</p><p>- DartCodeViewer.flutterInteract2019</p><p>Here is an example on how to use these themed code viewers.</p><pre>DartCodeViewer.designDark(r’’’</pre><pre>void main() {</pre><pre>runApp(MyApp());</pre><pre>}</pre><pre>‘’’,</pre><pre>),</pre><p>The DartCodeViewer can also be themed identical to how widgets in the material package get themed. You can theme the code viewer by having an ancestor of DartCodeViewerTheme. The dart code viewer theme describes the color, size, and text styles for the dart code viewer it is attached to.</p><p>Descendant widget obtains the current theme’s DartCodeViewerThemeData object using DartCodeViewerTheme.of(). When a widget uses DartCodeViewerTheme.of(), it is automatically rebuilt if the theme later changes.</p><p>Using the DartCodeViewerThemeData returns the data from the closest DartCodeViewerTheme instances that encloses the given context. The default parameters are set within the DartCodeViewer.</p><p>DartCodeViewerThemeData holds the color, size, and text styles for a dart code viewer theme. Use this class to configure a DartCodeViewerThemeData widget. To obtain the current ambient dart code viewer theme, use DartCodeViewerTheme.of().</p><p>The simplest way to create a DartCodeThemeData is to use the copyWith on the one you get from DartCodeViewerTheme.of(), or create an entirely new one with DartCodeViewerThemeData.</p><p>Here is an example below:</p><pre>DartCodeViewerTheme(</pre><pre>  data: DartCodeViewerThemeData(</pre><pre>    backgroundColor: Colors.pink,</pre><pre>    copyButtonText: Text(‘Copiar’),</pre><pre>  ),</pre><pre>  child: DartCodeViewer.textColor(r’’’</pre><pre>void main() {</pre><pre>runApp(MyApp());</pre><pre>}</pre><pre>‘’’,</pre><pre>  textStyle: GoogleFonts.lato(),</pre><pre>  commentColor: Colors.grey,</pre><pre>  baseColor: Colors.pink,</pre><pre>),</pre><h3>Closing remarks</h3><p>The dart code viewer is based off the code viewer from the <a href="https://gallery.flutter.dev/#/">Flutter Gallery</a>. Learn more about the <a href="https://pub.dev/packages/dart_code_viewer">dart code viewer package</a>.</p><p><em>To learn more about Jose, visit his pages on </em><a href="https://github.com/JoseAlba"><em>GitHub</em></a><em>, </em><a href="https://www.linkedin.com/in/josealba1996/"><em>LinkedIn</em></a><em>, </em><a href="https://www.youtube.com/channel/UCOdKA_On0oPe1tz02z1QfxA?view_as=subscriber"><em>YouTube</em></a><em>, and </em><a href="https://www.instagram.com/jose.alba/"><em>Instagram</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=59e120a47166" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/dart-code-viewer-59e120a47166">Dart Code Viewer</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Enums with Extensions Dart]]></title>
            <link>https://blog.flutter.dev/enums-with-extensions-dart-460c42ea51f7?source=rss-a8e501ba3326------2</link>
            <guid isPermaLink="false">https://medium.com/p/460c42ea51f7</guid>
            <category><![CDATA[extension]]></category>
            <category><![CDATA[spotlight]]></category>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[enumeration]]></category>
            <dc:creator><![CDATA[Jose Alba]]></dc:creator>
            <pubDate>Fri, 17 Jul 2020 06:05:40 GMT</pubDate>
            <atom:updated>2020-07-17T06:05:40.963Z</atom:updated>
            <content:encoded><![CDATA[<h3>Enums with Extensions in Dart</h3><p>How to write cleaner code using extension methods in Dart</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/1*j9632GFfT3IT7sfeiHUZtw.png" /><figcaption>Example of Dart code using an extension method</figcaption></figure><p>Dart has recently released support for extension methods, which means that you can now use this awesome feature. This article describes one example of how I use extension methods in my Flutter code.</p><p>I’ve always used enums in my Flutter code, but integrating enums and extension methods has made developing in Flutter easier and the code cleaner to read.</p><p>Let’s say you make an enumeration and your text is dependent on your enum. Previously, I would have used a switch statement within the Widget by using <a href="https://en.wikipedia.org/wiki/Immediately_invoked_function_expression">IIFE</a> (<a href="https://medium.com/dartlang/3-cool-dart-patterns-6d8d9d3d8fb8">medium post</a>). An <em>immediately invoked function expression</em> lets you invoke an anonymous method, which is a useful Dart pattern. But using this pattern might lead to spaghetti code, as shown in the example below. Also, if you need to add the same text elsewhere, you would have to copy the entire code snippet instead of just making a function call.</p><pre>Text((){</pre><pre>  switch (selectedColor) {</pre><pre>    case SelectedColor.PrimaryColor:</pre><pre>      return &#39;This is the Primary Color&#39;;</pre><pre>    case SelectedColor.SecondaryColor:</pre><pre>      return &#39;This is the Secondary Color&#39;;</pre><pre>    default:</pre><pre>      return &#39;SelectedScheme Title is null&#39;;</pre><pre>  }</pre><pre>}()),</pre><pre>Text((){</pre><pre>  switch (selectedColor) {</pre><pre>    case SelectedColor.PrimaryColor:</pre><pre>      return &#39;This is the Primary Color&#39;;</pre><pre>    case SelectedColor.SecondaryColor:</pre><pre>      return &#39;This is the Secondary Color&#39;;</pre><pre>    default:</pre><pre>      return &#39;SelectedScheme Title is null&#39;;</pre><pre>  }</pre><pre>}()),</pre><p>Also, what happens if you need to change the text color based on the enum? You would need to use another IIFE to get the PrimaryColor or SecondaryColor.</p><p>Instead, you can extend your enum and create a method within that extension so you don’t have to use an IIFE . That way when you invoke your method in your code, it looks cleaner but still gives you the same result. This is an important technique that Java developers are familiar with, and is an expected capability of enums.</p><pre>enum SelectedColor {</pre><pre>  primaryColor,</pre><pre>  secondaryColor,</pre><pre>}</pre><pre>extension SelectedColorExtension on SelectedColor {</pre><pre>  String get name =&gt; describeEnum(this);</pre><pre>  String get displayTitle {</pre><pre>    switch (this) {</pre><pre>      case SelectedColor.PrimaryColor:</pre><pre>        return &#39;This is the Primary Color&#39;;</pre><pre>      case SelectedColor.SecondaryColor:</pre><pre>        return &#39;This is the Secondary Color&#39;;</pre><pre>      default:</pre><pre>        return &#39;SelectedScheme Title is null&#39;;</pre><pre>    }</pre><pre>  }</pre><pre>}</pre><p>The describeEnum() function, which is defined in the Flutter foundation library, strips off the enum class name from enumEntry.toString(). I provide the code below in the event that you want to use it outside of Flutter development, for other Dart projects:</p><pre>String describeEnum(Object enumEntry) {</pre><pre>  final String description = enumEntry.toString();</pre><pre>  final int indexOfDot = description.indexOf(&#39;.&#39;);</pre><pre>  assert(indexOfDot != -1 &amp;&amp; indexOfDot &lt; description.length - 1);</pre><pre>  return description.substring(indexOfDot + 1);</pre><pre>}</pre><p>To play around with the example mentioned above try this Pen.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcodepen.io%2FJoseAlba%2Fembed%2Fpreview%2FzYvLPBM%3Fheight%3D600%26slug-hash%3DzYvLPBM%26default-tabs%3Djs%2Cresult%26host%3Dhttps%3A%2F%2Fcodepen.io&amp;display_name=CodePen&amp;url=https%3A%2F%2Fcodepen.io%2FJoseAlba%2Fpen%2FzYvLPBM&amp;image=https%3A%2F%2Fassets.codepen.io%2F4404447%2Finternal%2Fscreenshots%2Fpens%2FzYvLPBM.default.png%3Fformat%3Dauto%26amp%3Bheight%3D400%26amp%3Bquality%3D75%26amp%3Bv%3D1%26amp%3Bversion%3D1589371047%26amp%3Bwidth%3D700&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=codepen" width="800" height="600" frameborder="0" scrolling="no"><a href="https://medium.com/media/ca1fcd4f1c9431f8f5a17a15cd495372/href">https://medium.com/media/ca1fcd4f1c9431f8f5a17a15cd495372/href</a></iframe><p>In the full example, which you can see in CodePen above, the enum is extended with four methods: displayTitle(), displayColorChangeText(), color(), and getRandomSelectedColor(). When calling the displayTitle() method within the Flutter code you can see that the code is modularized, making it cleaner, as compared to the IIFE. Additionally, if you ever decide to add another enum variable within your enumeration it’s easier to update since all of the code is within the extension. This is seen when the color() method was called to change the text color. If I wanted to do this with the IIFE the code would get complicated quickly. It’s also easier to add methods in the future by using extensions; you can see this when the color() method was invoked in the CodePen.</p><p>The <a href="https://gallery.flutter.dev/#/">Flutter Gallery</a> uses enums with extensions when <a href="https://github.com/flutter/gallery/blob/74d9d92883c6ca10742c44df309f065289cf2f55/lib/data/demos.dart#L53-L75">handling category demos</a>. The Gallery uses enums to categorize the demo code and uses extensions methods when they want to convert their enumeration into text for the application.</p><h3>Closing remarks</h3><p><a href="https://dart.dev/guides/language/extension-methods">Extension methods</a> are a powerful tool provided by Dart. By using enums and extension methods together, you can have cleaner, more scalable code.</p><p>Learn more about the useful dart patterns in<a href="https://medium.com/dartlang/3-cool-dart-patterns-6d8d9d3d8fb8"> 3 Cool Dart Patterns for everyday programming in Flutter.</a></p><p><em>About the author: Jose recently graduated from university and now works on </em><a href="https://material.io/"><em>Material</em></a><em>, a design system that helps teams build high-quality digital experiences. Jose’s team maintains the Flutter </em><a href="https://api.flutter.dev/flutter/material/material-library.html"><em>material library</em></a><em>.</em></p><p><em>To learn more about Jose, visit his pages on </em><a href="https://github.com/JoseAlba"><em>GitHub</em></a><em>, </em><a href="https://www.linkedin.com/in/josealba1996/"><em>LinkedIn</em></a><em>, </em><a href="https://www.youtube.com/channel/UCOdKA_On0oPe1tz02z1QfxA?view_as=subscriber"><em>YouTube</em></a><em>, and </em><a href="https://www.instagram.com/jose.alba/"><em>Instagram</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=460c42ea51f7" width="1" height="1" alt=""><hr><p><a href="https://blog.flutter.dev/enums-with-extensions-dart-460c42ea51f7">Enums with Extensions Dart</a> was originally published in <a href="https://blog.flutter.dev/">Flutter</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What’s new with the Slider widget?]]></title>
            <link>https://blog.flutter.dev/whats-new-with-the-slider-widget-ce48a22611a3?source=rss-a8e501ba3326------2</link>
            <guid isPermaLink="false">https://medium.com/p/ce48a22611a3</guid>
            <category><![CDATA[slider]]></category>
            <category><![CDATA[material-design]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[announcements]]></category>
            <dc:creator><![CDATA[Jose Alba]]></dc:creator>
            <pubDate>Thu, 18 Jun 2020 20:32:15 GMT</pubDate>
            <atom:updated>2020-09-03T11:44:03.640Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0vbyZT-NITTvqljO8HtU4w.png" /></figure><p>Flutter lets you create beautiful, natively compiled applications. The reason Flutter can do this is because Flutter loves Material. <a href="https://material.io/">Material</a> is a design system that helps build high-quality, digital experiences. As UI design continues to evolve, Material continues to update its components, motion, and design system.</p><p>Flutter recently updated the <a href="https://api.flutter.dev/flutter/material/Slider-class.html">Slider</a> and <a href="https://api.flutter.dev/flutter/material/RangeSlider-class.html">RangeSlider</a> widgets to the latest the Material guidelines. The new sliders were designed with better accessibility in mind: The tracks are taller, the thumbs have shadows, and the value indicators have a new shape and improved text scaling support.</p><p>This article describes the changes to the Slider and RangeSlider widgets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/546/0*neQ_0e28CgjA00W_" /></figure><h3>What’s new?</h3><p>Slider and RangeSlider were updated, to have a smoother experience when you work with these widgets. This diagram demonstrates the five different components that go into making the slider widgets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*elEXE_pM0iEDuv_t" /></figure><p>Both Slider and RangeSlider consist of five parts:</p><ol><li>Value indicators that show labels for thumb values</li><li>A track that the thumbs slide across</li><li>Thumbs that indicate the position of the value</li><li>Overlays that display when the thumbs are pressed</li><li>Tick marks on the track when the slider is discrete</li></ol><p>Note: This article refers to two different types of overlays:</p><ul><li>The OverlaySlider component represents the component mentioned in the preceding image.</li><li>Flutter’s Overlay class is used to ‘float’ widgets over all the other widgets shown on the following screen.</li></ul><h3>New default value indicator shape</h3><p>The biggest visual difference between the old slider and the new slider widgets is the default value indicators: <a href="https://master-api.flutter.dev/flutter/material/RectangularSliderValueIndicatorShape-class.html">RectangularSliderValueIndicatorShape</a> for Slider and <a href="https://master-api.flutter.dev/flutter/material/RectangularRangeSliderValueIndicatorShape-class.html">RectangularRangeSliderValueIndicatorShape</a> for RangeSlider. The indicators reflect the latest design changes from Material. The old indicator shape was an upside-down pear, and the new shape is more rectangular and looks like a speech bubble. The value indicator was updated for both Slider and RangeSlider.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/538/0*i3IWhVNFBB5OJEze" /></figure><h3>Value indicator paints on the overlay</h3><p>The updated value indicator is now painted on the overlay. This means that the indicator is no longer restricted to the scope of the slider’s MediaQuery and can be displayed over other widgets. This is expected because the indicator is only activated when dealing with the gesture detector, which means that it’s only shown when the user interacts with the slider. By integrating the <a href="https://api.flutter.dev/flutter/widgets/Overlay-class.html">Overlay</a> with the <a href="https://api.flutter.dev/flutter/widgets/CompositedTransformTarget-class.html">CompositedTransformTarget</a>, <a href="https://api.flutter.dev/flutter/widgets/CompositedTransformFollower-class.html">CompositedTransformFollower</a>, and <a href="https://api.flutter.dev/flutter/rendering/LayerLink-class.html">Layerlink</a> widgets, the value indicator can display over other widgets. To learn more about this mechanism, see <a href="https://medium.com/flutter/how-to-float-an-overlay-widget-over-a-possibly-transformed-ui-widget-1d15ca7667b6">How to float an overlay widget over a (possibly transformed) UI widget</a>.</p><p>The following diagram shows how the Slider and RangeSlider widgets are made:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*DEYZqsMMIdQWZ8mF" /></figure><p>You may notice that we use a separate LeafRenderObjectWidget to paint the indicators on the overlay. This is because we need to paint on both the Overlay class and the screen, which you can’t do from the same LeafRenderObjectWidget widget.</p><p>Because we’re now painting the value indicator on the overlay, it’s no longer restricted to the scope of the MediaQuery that contains the slider. The indicator is no longer clipped to that box, which means that the entire value indicator is displayed always.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/0*HviG9DqaeW84PJi5" /></figure><p>Note: This example was made with the textScaleFactor set to 4 for better demonstration.</p><p>The value indicator rectangle is shifted so that part of the indicator doesn’t go off screen. This improvement allows you to increase the number of digits within the indicator and increase the text scale factor of your application without worrying if the text exceeds the screen size. In the following image, the value indicator text scale is 4 and contains a 3-digit value, but the slider handles it with no problem.</p><pre>double getHorizontalShift({</pre><pre>  RenderBox parentBox,</pre><pre>  Offset center,</pre><pre>  TextPainter labelPainter,</pre><pre>  double textScaleFactor,</pre><pre>  Size sizeWithOverflow,</pre><pre>  double scale,</pre><pre>}) {</pre><pre>  assert(!sizeWithOverflow.isEmpty);</pre><pre>  const double edgePadding = 8.0;</pre><pre>  final double rectangleWidth = _upperRectangleWidth(labelPainter, scale, textScaleFactor);</pre><pre>  /// Value indicator draws on the overlay, and by using the global Offset,</pre><pre>  /// we are making sure that we use the bounds of the Overlay instead of the Slider.</pre><pre>  final Offset globalCenter = parentBox.localToGlobal(center);</pre><pre>  // The rectangle must be shifted toward the center so that it minimizes the</pre><pre>  // chance of it rendering outside the bounds of the render box. If the shift</pre><pre>  // is negative, then the lobe is shifted from right to left. If the shift is</pre><pre>  // positive, then the lobe is shifted from left to right.</pre><pre>  final double overflowLeft = math.max(0, rectangleWidth / 2 —     globalCenter.dx + edgePadding);</pre><pre>  final double overflowRight = math.max(0, rectangleWidth / 2 — (sizeWithOverflow.width — globalCenter.dx — edgePadding));</pre><pre>  if (rectangleWidth &lt; sizeWithOverflow.width) {</pre><pre>    return overflowLeft — overflowRight;</pre><pre>  } else if (overflowLeft — overflowRight &gt; 0) {</pre><pre>    return overflowLeft — (edgePadding * textScaleFactor);</pre><pre>  } else {</pre><pre>    return -overflowRight + (edgePadding * textScaleFactor);</pre><pre>  }</pre><pre>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*f7ar1ek7C7pUx5cF" /></figure><p>Note: This example was made with the textScaleFactor set to 4 for better demonstration.</p><h3>Activated value indicator takes precedence</h3><p>The RangeSlider value indicator was also updated so that the currently active indicator takes precedence over the resting indicator. This means that if the indicators overlap, then the active indicator ‘floats’ over the other one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*dUrIA4k2wFu48rDe" /></figure><p>Note: This example was made with the textScaleFactor set to 4 for better demonstration.</p><h3>Old value indicator updated</h3><p>We kept the PaddleValueIndicator widget, and updated it to have better scalability and accessibility. The PaddleValueIndicator widget is also printed on the Overlay like the RectangularSliderValueIndicatorShape. In the following example, you can see that both Slider and RangeSlider are using the old value indicator.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcodepen.io%2FJoseAlba%2Fembed%2Fpreview%2FqBOXGYx%3Fheight%3D600%26slug-hash%3DqBOXGYx%26default-tabs%3Djs%2Cresult%26host%3Dhttps%3A%2F%2Fcodepen.io&amp;display_name=CodePen&amp;url=https%3A%2F%2Fcodepen.io%2FJoseAlba%2Fpen%2FqBOXGYx&amp;image=https%3A%2F%2Fassets.codepen.io%2F4404447%2Finternal%2Fscreenshots%2Fpens%2FqBOXGYx.default.png%3Fformat%3Dauto%26amp%3Bha%3Dfalse%26amp%3Bheight%3D400%26amp%3Bquality%3D75%26amp%3Bv%3D1%26amp%3Bversion%3D1588255046%26amp%3Bwidth%3D700&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=codepen" width="800" height="600" frameborder="0" scrolling="no"><a href="https://medium.com/media/806bfbab86232e488ae536ef5500009f/href">https://medium.com/media/806bfbab86232e488ae536ef5500009f/href</a></iframe><p>If you want to continue using the old value indicator, then just wrap your Slider widget with SliderTheme, and set the valueIndicatorShape property in SliderThemeData to PaddleSliderValueIndicatorShape. The process is identical for RangeSlider. Wrap your RangeSlider widget with SliderTheme, and set the rangeValueIndicatorShape property in SliderThemeData to PaddleRangeSliderValueIndicatorShape.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/0*LNKN4lwqpBxQZ60A" /></figure><h3>The active track is bigger than the inactive track</h3><p>The other component shapes in Slider were also updated. The track shape was changed so that the active part of the track is bigger than the inactive part of the track. This means that if your application uses a left-to-right language, then the left part of the track is bigger than the right. If your application uses a right-to-left language, then the right part of the track is bigger than the left. For RangeSlider, the active track is the portion of the track between the two thumbs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/0*q81pqrMZMWkCmRLF" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/0*qIoICKw6wo7NcwOW" /></figure><h3>Tick mark component</h3><p>The tick mark size and positioning changed. The tick marks are now part of the track component instead of extending the end of the track. There is also padding on the tick mark, so it appears within the track component. The size of the tick mark now has a radius of 1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/0*PLNNQjK0_zOXok1A" /></figure><h3>Thumb component has a shadow</h3><p>When the thumb slider component is activated, there is now a Shadow that appears on the Overlay.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/94/0*j7DxUmBmRK7Ztd5A" /></figure><h3>Closing remarks</h3><p>You can try these changes by switching to Flutter version 1.18.0–9.0. This version is available only on the master branch during the release of this article. You can switch to the master branch by running flutter channel master and then flutter upgrade.</p><p>Learn more about the development of the RangeSlider in <a href="https://medium.com/flutter/material-range-slider-in-flutter-a285c6e3447d">Material RangeSlider in Flutter</a>.</p><p><em>About the author: Jose recently graduated from university and now works on </em><a href="https://material.io/"><em>Material</em></a><em>, a design system that helps teams build high-quality digital experiences. Jose’s team maintains the Flutter </em><a href="https://api.flutter.dev/flutter/material/material-library.html"><em>material library</em></a><em>. To learn more, visit his Jose’s pages on </em><a href="https://github.com/JoseAlba"><em>GitHub</em></a><em>, </em><a href="https://www.linkedin.com/in/josealba1996/"><em>LinkedIn</em></a><em>, </em><a href="https://www.youtube.com/channel/UCOdKA_On0oPe1tz02z1QfxA?view_as=subscriber"><em>YouTube</em></a><em>, and </em><a href="https://www.instagram.com/jose.alba/"><em>Instagram</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ce48a22611a3" width="1" height="1" alt=""><hr><p><a href="https://blog.flutter.dev/whats-new-with-the-slider-widget-ce48a22611a3">What’s new with the Slider widget?</a> was originally published in <a href="https://blog.flutter.dev/">Flutter</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Handling 404: Page not found error in Flutter]]></title>
            <link>https://blog.flutter.dev/handling-404-page-not-found-error-in-flutter-731f5a9fba29?source=rss-a8e501ba3326------2</link>
            <guid isPermaLink="false">https://medium.com/p/731f5a9fba29</guid>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[routesetting]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[404]]></category>
            <dc:creator><![CDATA[Jose Alba]]></dc:creator>
            <pubDate>Wed, 10 Jun 2020 22:13:19 GMT</pubDate>
            <atom:updated>2020-06-11T17:10:34.861Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*eU-430nepv8cz3OYLIycng.png" /></figure><p>Flutter has released web support that allows you to create dynamic websites. Flutter supports handling any error that might come from web usage such as 404 errors. But, how do you make a custom 404 page for your Flutter application?</p><p>This article describes how to create custom pages that are shown anytime a user navigates to a page that doesn’t exist.</p><h3>How to redirect clients to a custom 404 page in Flutter</h3><p>Everyone has encountered a “404: Page not found error” when browsing the internet. Flutter handles this issue by automatically redirecting you to the initial route. This is usually the home page of your application. But what if you want to have a fancy 404 page like the ones at <a href="https://36bvmt283fg61unuud3h7qua-wpengine.netdna-ssl.com/wp-content/uploads/2013/03/airbnb-404.gif">AirBnb</a>, <a href="https://mamchenkov.net/wordpress/wp-content/uploads/2013/11/github-404.png">GitHub</a>, or even the <a href="https://flutter.dev/foo">Flutter website</a>? You can do this easily with Flutter.</p><p>To create a custom 404 page, your application needs to use the MaterialApp, CupertinoApp, or WidgetsApp widget. Most applications use one of these three widgets; it is the first widget you call when creating a Flutter application.</p><p>The MaterialApp configures the top-level Navigator to search for routes in the following order:</p><ol><li>For the / route, the <a href="https://api.flutter.dev/flutter/material/MaterialApp/home.html">home</a> property, if non-null, is used.</li><li>Otherwise, the <a href="https://api.flutter.dev/flutter/material/MaterialApp/routes.html">routes</a> table is used, if it has an entry for the route.</li><li>Otherwise, <a href="https://api.flutter.dev/flutter/material/MaterialApp/onGenerateRoute.html">onGenerateRoute</a> is called, if provided. It should return a non-null value for any valid route not handled by <a href="https://api.flutter.dev/flutter/material/MaterialApp/home.html">home</a> and <a href="https://api.flutter.dev/flutter/material/MaterialApp/routes.html">routes</a>.</li><li>Finally if all else fails <a href="https://api.flutter.dev/flutter/material/MaterialApp/onUnknownRoute.html">onUnknownRoute</a> is called.</li></ol><p>If your route isn’t handled in any of these tables then it uses the <a href="https://api.flutter.dev/flutter/material/MaterialApp/onUnknownRoute.html">onUnknownRoute</a> property to handle your navigation. This callback is typically used for error handling. For example, this function might always generate a “not found” page that describes the route that wasn’t found. Unknown routes can arise either from errors in the app or from external requests to push routes, such as from Android intents.</p><p>The following example code demonstrates how to define an anonymous function for the onUnknownRoute property, which takes a RouteFactory, a factory method that takes a RouteSettings function as input and returns a Route. The following snippet shows how simple it can be to define the onUnknownRoute property:</p><pre>onUnknownRoute: (settings) {</pre><pre>  return MaterialPageRoute(builder: (_) =&gt; PageNotFound());</pre><pre>},</pre><p>PageNotFound is a custom widget that creates the 404 page . This page might explain what happened and redirect the user to the home page, but you can be as creative as you want when creating your 404 your page.</p><h3>Closing Remarks</h3><p>When creating a Flutter application it is important to handle any issues that might arise. Using the onUnknownRoute property within MaterialApp, CupertinoApp, or WidgetApp lets you handle the inevitable “page not found” errors in your website.</p><p>To learn more about routes in Flutter, see the Medium post <a href="https://medium.com/flutter/flutter-web-navigating-urls-using-named-routes-307e1b1e2050">“Navigating URLs using named routes”</a>.</p><p><em>About the author: Jose recently graduated from university and now works on </em><a href="https://material.io/"><em>Material</em></a><em>, a design system that helps teams build high-quality digital experiences. Jose’s team maintains the Flutter </em><a href="https://api.flutter.dev/flutter/material/material-library.html"><em>material library</em></a><em>. To learn more, visit his Jose’s pages on </em><a href="https://github.com/JoseAlba"><em>GitHub</em></a><em>, </em><a href="https://www.linkedin.com/in/josealba1996/"><em>LinkedIn</em></a><em>, </em><a href="https://www.youtube.com/channel/UCOdKA_On0oPe1tz02z1QfxA?view_as=subscriber"><em>YouTube</em></a><em>, and </em><a href="https://www.instagram.com/jose.alba/"><em>Instagram</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=731f5a9fba29" width="1" height="1" alt=""><hr><p><a href="https://blog.flutter.dev/handling-404-page-not-found-error-in-flutter-731f5a9fba29">Handling 404: Page not found error in Flutter</a> was originally published in <a href="https://blog.flutter.dev/">Flutter</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[3 cool Dart patterns]]></title>
            <link>https://medium.com/dartlang/3-cool-dart-patterns-6d8d9d3d8fb8?source=rss-a8e501ba3326------2</link>
            <guid isPermaLink="false">https://medium.com/p/6d8d9d3d8fb8</guid>
            <category><![CDATA[iife]]></category>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[conditional-statements]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Jose Alba]]></dc:creator>
            <pubDate>Wed, 20 May 2020 16:01:01 GMT</pubDate>
            <atom:updated>2020-05-20T16:43:44.439Z</atom:updated>
            <content:encoded><![CDATA[<p><em>About the author: Jose recently graduated from university and now works on </em><a href="https://material.io/"><em>Material</em></a><em>, a design system that helps teams build high-quality digital experiences. Jose’s team maintains the Flutter </em><a href="https://api.flutter.dev/flutter/material/material-library.html"><em>material library</em></a><em>.</em></p><p>With the Flutter framework, you use the Dart programming language to create beautiful applications. Over time, I have learned useful Dart patterns that have helped me become a better Flutter developer. Here are three that I recommend you try in your next application:</p><ul><li>Conditionally assigning a value: boolean ? widget : widget</li><li>Merging widgets into a collection: for ()...[]</li><li>Immediately invoking an anonymous function: () {} ()</li></ul><p>This article shows you how to use each pattern, finishing with an embedded Pen where you can play with the code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*alx_hKg5fP3b1b22" /><figcaption>This screenshot shows the code I will discuss and the UI it produces.</figcaption></figure><h3>Conditionally assigning a value</h3><p>The <a href="https://dart.dev/guides/language/language-tour#conditional-expressions">conditional assignment operator</a>, ?: (also known as a <a href="https://en.wikipedia.org/wiki/%3F:">ternary operator</a>), requires one conditional expression and two value expressions. This pattern is useful when your widget depends on a boolean value. Instead of modularizing the operation into a separate method, you can use the ternary operator to run the code inline. I have used this technique countless times.</p><p>In the following example, the AppBar title depends on a boolean value. (In this case, the value is dependent on the isVegetarian boolean.) If the value is true, the title text is set to the first value (“Vegetarian Food”); otherwise it’s the second value (“Non-Vegetarian Food”).</p><pre>appBar: AppBar(<br>  title: Text(Random().nextBool() <br>      ? &#39;Vegetarian Food&#39; <br>      : &#39;Non-Vegetarian Food&#39;),<br>),</pre><h3>Merging widgets into a collection</h3><p>This pattern, for () ...[], uses the spread operator (...) to merge a list of widgets into an existing collection. I use this any time I am working with a list of widgets, often with the children property. The following example uses this technique to create a list of widgets:</p><pre>children: [<br>  Container(),<br>  for (final food in foods) ...[<br>    if (isVegetarian == food.isVegetarian)<br>      ListTile(title: Text(food.name)),<br>    SizedBox(height: 50.0),<br>  ],<br>],</pre><p>In this example, foods is a list of Food objects, defined as follows:</p><pre>List&lt;Food&gt; foods = [<br>  Food(name: &#39;apple&#39;, isVegetarian: true),<br>  Food(name: &#39;nuts&#39;, isVegetarian: true),<br>  Food(name: &#39;eggs&#39;, isVegetarian: true),<br>  Food(name: &#39;chicken&#39;, isVegetarian: false),<br>];</pre><pre>class Food {<br>  Food({<br>    this.name,<br>    this.isVegetarian,<br>  });</pre><pre>  String name;<br>  bool isVegetarian;<br>}</pre><p>The for () ...[] pattern is handy whenever you need to add multiple widgets (such as the ListTile widgets in the example if isVegetarian is true) multiple times (3 times, in the example) into a list of widgets.</p><p>Because the spread operator (...) is relatively new to Dart, make sure that your pubspec.yaml file specifies a Dart SDK of 2.3.0 or later:</p><pre>environment:<br>  sdk: &quot;&gt;=2.3.0 &lt; 3.0.0&quot;</pre><p>To learn more about <a href="https://dart.dev/guides/language/language-tour#collection-operators">collection operators</a> and <a href="https://dart.dev/guides/language/language-tour#spread-operator">spread operators</a>, read the <a href="https://dart.dev/guides/language/language-tour">Dart language tour</a>.</p><h3>Immediately invoking an anonymous function</h3><p>The third pattern, () {} (), is the Dart equivalent of an <em>immediately invoked function expression (</em><a href="https://en.wikipedia.org/wiki/Immediately_invoked_function_expression"><em>IIFE</em></a><em>).</em> This handy pattern lets you define an anonymous function and execute it immediately. I found this pattern extremely useful when working with a widget that could have multiple outputs. Instead of having nested ternary operators or modularizing a simple call, the code is available inline. The following example shows this pattern, with an anonymous function that contains a switch statement.</p><pre>color: () {<br>  switch (getRandomElement(foods).name) {<br>    case &#39;apple&#39;:<br>      return Colors.green;<br>    case &#39;nuts&#39;:<br>      return Colors.brown;<br>    case &#39;eggs&#39;:<br>      return Colors.yellow;<br>    default:<br>      return Colors.transparent;<br>  }<br>}(),</pre><h3>Conclusion</h3><p>You can use CodePen to play with Flutter code. Here’s a Pen that has all the code in this article:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcodepen.io%2FJoseAlba%2Fembed%2Fpreview%2FmdeKexM%3Fheight%3D600%26slug-hash%3DmdeKexM%26default-tabs%3Djs%2Cresult%26host%3Dhttps%3A%2F%2Fcodepen.io&amp;display_name=CodePen&amp;url=https%3A%2F%2Fcodepen.io%2FJoseAlba%2Fpen%2FmdeKexM&amp;image=https%3A%2F%2Fscreenshot.codepen.io%2F4404447.mdeKexM.small.639bc042-f20b-4346-89cc-073a0500f278.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=codepen" width="800" height="600" frameborder="0" scrolling="no"><a href="https://medium.com/media/1c05a523420e8c039a9cd0f7f73fae99/href">https://medium.com/media/1c05a523420e8c039a9cd0f7f73fae99/href</a></iframe><p>Here is another CodePen example with just colors:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcodepen.io%2FJoseAlba%2Fembed%2Fpreview%2FeYpgpzY%3Fheight%3D600%26slug-hash%3DeYpgpzY%26default-tabs%3Djs%2Cresult%26host%3Dhttps%3A%2F%2Fcodepen.io&amp;display_name=CodePen&amp;url=https%3A%2F%2Fcodepen.io%2FJoseAlba%2Fpen%2FeYpgpzY&amp;image=https%3A%2F%2Fscreenshot.codepen.io%2F4404447.eYpgpzY.small.79a6eaaa-84bc-4960-8e82-1a3ea215fde9.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=codepen" width="800" height="600" frameborder="0" scrolling="no"><a href="https://medium.com/media/3b4a9c1293856a063957eb063d0ae9f2/href">https://medium.com/media/3b4a9c1293856a063957eb063d0ae9f2/href</a></iframe><p>I hope that these three Dart patterns give you more freedom while developing Flutter applications. If you have other favorite techniques, share them in the comments!</p><p><em>To learn more about Jose, visit him on </em><a href="https://github.com/JoseAlba"><em>GitHub</em></a><em>, </em><a href="https://www.linkedin.com/in/josealba1996/"><em>LinkedIn</em></a><em>, </em><a href="https://www.youtube.com/channel/UCOdKA_On0oPe1tz02z1QfxA?view_as=subscriber"><em>YouTube</em></a><em>, or </em><a href="https://www.instagram.com/jose.alba/"><em>Instagram</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6d8d9d3d8fb8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dartlang/3-cool-dart-patterns-6d8d9d3d8fb8">3 cool Dart patterns</a> was originally published in <a href="https://medium.com/dartlang">Dart</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to embed a Flutter application in a Website using DartPad]]></title>
            <link>https://blog.flutter.dev/how-to-embed-a-flutter-application-in-a-website-using-dartpad-b8fd0ee8c4b9?source=rss-a8e501ba3326------2</link>
            <guid isPermaLink="false">https://medium.com/p/b8fd0ee8c4b9</guid>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[dartpad]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Jose Alba]]></dc:creator>
            <pubDate>Mon, 23 Mar 2020 21:21:53 GMT</pubDate>
            <atom:updated>2020-05-13T19:54:39.459Z</atom:updated>
            <content:encoded><![CDATA[<p><em>About the author: Jose recently graduated from university and now works on </em><a href="https://material.io/"><em>Material</em></a><em>, a design system that helps teams build high-quality digital experiences. Jose’s team maintains the Flutter </em><a href="https://api.flutter.dev/flutter/material/material-library.html"><em>material library</em></a><em>.</em></p><p>Have you ever wanted to embed your mobile application into a website? This is now easy to do with Flutter.</p><p>Flutter is a framework that lets you create native applications for iOS and Android and, most recently, for the web! This means that you can now develop a website using Flutter. <a href="https://dartpad.dev/">DartPad,</a> the open source tool that lets you run Dart in any modern browser, has also been extended to support Flutter applications. You can now make a simple application on the web and share it with others, instead of hosting the Flutter application somewhere and then embedding it into a web page.</p><p>This feature is useful and powerful, as you can imagine. Users can simultaneously see both the code and running application. Here are a list of steps you can follow to embed your Flutter application. There are two ways to create a DartPad instance using GitHub:</p><ol><li>Using a Gist file</li><li>Using a GitHub repo</li></ol><h3>Using a Gist file</h3><ol><li>To get started, open <a href="https://dartpad.dev/">DartPad</a> and create the application you want to share with others. The code you write here represents the main.dart file in a Flutter application. You can also use an editor to do this but be aware that DartPad does have some limitations. For example, you are limited to one Dart file, a default pubspec, and you can’t import non-Dart libraries or plugins..</li></ol><p>This article uses the following code:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/00388bda50db2f09752d22ee5c8ac92f/href">https://medium.com/media/00388bda50db2f09752d22ee5c8ac92f/href</a></iframe><p>Note that importing ‘package:flutter/material.dart’ tells DartPad that this is a Flutter app.</p><p>Once your Flutter application builds in DartPad, copy this code and paste it into a <a href="https://gist.github.com/">new gist file</a> on GitHub. This gist can be either public or private. A gist is a git repository for simple purposes like sharing code. The file name of your gist must be main.dart . For reference, see my <a href="https://gist.github.com/JoseAlba/a205e21aa0d0a64fe7c977107ce22cbf">main.dart gist</a> file. If you are having problems, see the <a href="https://github.com/dart-lang/dart-pad/wiki/Sharing-Guide">DartPad Sharing Guide</a>.</p><p><a href="https://gist.github.com/JoseAlba/a205e21aa0d0a64fe7c977107ce22cbf">https://gist.github.com/JoseAlba/a205e21aa0d0a64fe7c977107ce22cbf</a></p><p>You can test if you did this correctly by checking if your gist is available on DartPad. To do this, replace everything before the gistID with “dartpat.dev/”. For example, to view “<a href="https://gist.github.com/JoseAlba/a205e21aa0d0a64fe7c977107ce22cbf">https://gist.github.com/JoseAlba/a205e21aa0d0a64fe7c977107ce22cbf</a>” in DartPad, use the URL, “<a href="https://dartpad.dev/a205e21aa0d0a64fe7c977107ce22cbf">https://dartpad.dev/a205e21aa0d0a64fe7c977107ce22cbf</a>”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*u979IALi6tiDee8O" /></figure><p>To embed your Flutter application, prefix the gist ID with “<a href="https://dartpad.dev/embed-flutter.html?id=a205e21aa0d0a64fe7c977107ce22cbf">https://dartpad.dev/embed-flutter.html?id=</a>”. For example, to view “<a href="https://gist.github.com/JoseAlba/a205e21aa0d0a64fe7c977107ce22cbf">https://gist.github.com/JoseAlba/a205e21aa0d0a64fe7c977107ce22cbf</a> “in an HTML iframe, use “<a href="https://dartpad.dev/embed-flutter.html?id=a205e21aa0d0a64fe7c977107ce22cbf">https://dartpad.dev/embed-flutter.html?id=a205e21aa0d0a64fe7c977107ce22cbf</a>” . You can learn more details about embedding DartPad code into a website in the <a href="https://github.com/dart-lang/dart-pad/wiki/Embedding-Guide">DartPad Embedding Guide</a>. I recommend you visit this page since it also explains the query parameters. The following example uses an &lt;iframe&gt; element:</p><pre>&lt;div style=”position:relative;padding-top:56.25%;”&gt;<br>&lt;iframe src=’https://dartpad.dev/embed-flutter.html?id=d&amp;theme=dark&amp;run=true&amp;split=50&#39; style=”position:absolute;top:0;left:0;width:100%;height:100%;”&gt;.       &lt;/iframe&gt;<br>&lt;/div&gt;</pre><p>This code created the screenshot below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*botL1tnoYh9nbjgw" /></figure><h3>Using a GitHub repo</h3><p>To get started, you need to create a repository. Within this repository there are a few files that you can have.</p><ul><li>dartpad_metadata.yaml (MANDATORY)</li><li>hint.txt (OPTIONAL)</li><li>main.dart (MANDATORY)</li><li>solution.dart (OPTIONAL)</li><li>test.dart (OPTIONAL)</li></ul><p>If you want to have only one Dart file, all you need are the dartpad_metadata.yaml and main.dart files, but you have the freedom to use other Dart files, too. In my case, I wanted to create the main.dart file without having the runApp() method within it, so I use test.dart to run the application. My repo consists of 3 files:</p><ul><li><a href="https://github.com/JoseAlba/flutter_code/blob/master/lib/dartpad/dartpad_metadata.yaml">dartpad_metadata.yaml</a></li><li><a href="https://github.com/JoseAlba/flutter_code/blob/master/lib/dartpad/main.dart">main.dart</a></li><li><a href="https://github.com/JoseAlba/flutter_code/blob/master/lib/dartpad/test.dart">test.dart</a></li></ul><p>Note that test.dart doesn’t require any imports. This is because DartPad sees main.dart and test.dart as one single file. So, if I import the Material package within main.dart, it will be seen in test.dart once the DartPad instance is loaded up.</p><p>To load this folder into DartPad you need to know the following:</p><ul><li>gh_owner: Owner of the GitHub account.</li><li>gh_repo: Name of the repo within the above account.</li><li>gh_path: Path to a dartpad_metadata.yaml file within the repo.</li><li>gh_ref: (optional) Branch to use when loading the file. Defaults to master.</li></ul><p>In my case:</p><ul><li>gh_owner: JoseAlba</li><li>gh_repo: flutter_code</li><li>gh_path: lib/dartpad</li><li>The gh_ref is not needed since I am using the master branch</li></ul><p>This means if I want to load:</p><p><a href="https://github.com/JoseAlba/flutter_code/blob/master/lib/dartpad/main.dart">https://github.com/JoseAlba/flutter_code/blob/master/lib/dartpad/main.dart</a></p><p>The DartPad URL would be:</p><p><a href="http://dartpad.dev/embed-flutter.html?gh_owner=JoseAlba&amp;gh_repo=flutter_code&amp;gh_path=lib/dartpad">dartpad.dev/embed-flutter.html?gh_owner=JoseAlba&amp;gh_repo=flutter_code&amp;gh_path=lib/dartpad</a></p><ol><li>To embed a flutter application into an iframe, specify the following:</li></ol><pre>&lt;div style=”position:relative;padding-top:56.25%;”&gt;</pre><pre>&lt;iframe src=’https://dartpad.dev/embed-flutter.html?gh_owner=JoseAlba&amp;gh_repo=flutter_code&amp;gh_path=lib/dartpad&amp;theme=dark&amp;run=true&amp;split=50&#39; style=”position:absolute;top:0;left:0;width:100%;height:100%;”&gt;&lt;/iframe&gt;</pre><pre>&lt;/div&gt;</pre><h3>In Conclusion</h3><p>DartPad is a powerful tool that helps you test, share, and embed your code into web pages. If you want to learn more. see the <a href="https://github.com/dart-lang/dart-pad/wiki">DartPad wiki</a>.</p><p><em>To learn more about Jose, visit his pages on </em><a href="https://github.com/JoseAlba"><em>GitHub</em></a><em>, </em><a href="https://www.linkedin.com/in/josealba1996/"><em>LinkedIn</em></a><em>, </em><a href="https://www.youtube.com/channel/UCOdKA_On0oPe1tz02z1QfxA?view_as=subscriber"><em>YouTube</em></a><em>, and </em><a href="https://www.instagram.com/jose.alba/"><em>Instagram</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b8fd0ee8c4b9" width="1" height="1" alt=""><hr><p><a href="https://blog.flutter.dev/how-to-embed-a-flutter-application-in-a-website-using-dartpad-b8fd0ee8c4b9">How to embed a Flutter application in a Website using DartPad</a> was originally published in <a href="https://blog.flutter.dev/">Flutter</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to float an overlay widget over a (possibly transformed) UI widget]]></title>
            <link>https://blog.flutter.dev/how-to-float-an-overlay-widget-over-a-possibly-transformed-ui-widget-1d15ca7667b6?source=rss-a8e501ba3326------2</link>
            <guid isPermaLink="false">https://medium.com/p/1d15ca7667b6</guid>
            <category><![CDATA[flutter-widget]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[flutter-ui]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <dc:creator><![CDATA[Jose Alba]]></dc:creator>
            <pubDate>Mon, 02 Mar 2020 19:48:10 GMT</pubDate>
            <atom:updated>2020-05-13T19:54:43.320Z</atom:updated>
            <content:encoded><![CDATA[<p><em>About the author: Jose recently graduated from university and now works on </em><a href="https://material.io/"><em>Material</em></a><em>, a design system that helps teams build high-quality digital experiences. Jose’s team maintains the Flutter </em><a href="https://api.flutter.dev/flutter/material/material-library.html"><em>material library</em></a><em>.</em></p><p>Say you have a widget in your app’s UI and you want to overlay a floating widget on top of that widget. Maybe that widget is rotated or has other transforms applied. How do you convey the position and transform information of the UI widget to the corresponding widget in the overlay?</p><p>You can do this using the CompositedTransformTarget, CompositedTransformWidget, LayerLink, Overlay, and OverlayEntry widgets.</p><p>In Flutter, the overlay lets you print visual elements on top of other widgets by inserting them into the overlay’s stack. You insert a widget into the overlay using an OverlayEntry and you use Positioned and AnimatedPositioned to choose where the entry is positioned within the overlay. This is useful when you need an item to appear on top of another widget (similar to the Stack widget) but you can use this widget anywhere without having to modify your entire codebase.</p><p>As described in this <a href="https://medium.com/saugo360/https-medium-com-saugo360-flutter-using-overlay-to-display-floating-widgets-2e6d0e8decb9">article</a>, a programmer needs to implement an autosuggestion feature to a text field widget to an existing page. They could implement this feature using a stack but, as mentioned in the article, this approach can be: intrusive, rigorous, error-prone, and just feels wrong. Instead of redesigning your whole screen into a stack, you can use the overlay widget to add this effect. This scenario can happen any time a developer has to implement a new feature on an existing route.</p><p>Using an Overlay might seem intuitive but can be challenging to implement in Flutter. The overlay entry must be inserted using a callback method. Plus you need to keep a reference to the overlay entry since you remove the entry using the reference and not the context of the overlay. Also, if you need the overlay entry’s position and transformation to be dependent on another widget that is <em>not</em> in the overlay, it can get confusing. This is because the context of the overlay’s MediaQuery is different from the regular context. You may have seen this when using padding or margin in a Widget before making a call to the Overlay. Luckily, Flutter already takes care of these details for you.</p><p>If an overlay entry needs to follow a ‘target’ that is not on the overlay stack you can use CompositedTransformTarget, CompositedTransformFollower, and LayerLink to “glue” the widgets together To do this you need to:</p><ul><li>Wrap the widget on the overlay with a CompositedTransformFollower.</li><li>The follower has to be a descendant of CompositedTransformTarget.</li><li>The target Widget must be wrapped with a CompositedTransformTarget.</li><li>A LayerLink instance glues the follower and target together.</li></ul><p>In the following GIF, the blue container is not on the overlay but the green container is. The blue container is a child of CompositedTransformTarget and the green container is the child of CompostedTransformFollower. They are linked together using the same LayerLink instance. Note how the green overlay widget is aware of the bounds of the blue UI widget, even though the blue widget is not in the overlay:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*78wqXwvzHdc-vJ9lxtazkQ.gif" /></figure><p>Try it yourself using this <a href="https://dartpad.dev/8fd3ae34c3e5f1932dc687208be6f434">DartPad</a> instance. The example code is as follows:</p><p>Code by Hans Muller</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/51dec1a1513c0b1f1e887ad9a370266e/href">https://medium.com/media/51dec1a1513c0b1f1e887ad9a370266e/href</a></iframe><p>This example shows how to use these widgets together. To see the true power of these widgets, apply a Transformation to the CompositedTransformTarget. You will notice that the green overlay widget is also impacted by this transformation, thanks to their shared LayerLink widget.</p><p>In the following GIF, the blue container is not on the overlay but the green container is. This time the CompositedTransformTarget has been rotated. As you can see, even though the CompositeTransformFollower is on the overlay stack, it still knows where the target is and any transformations that have been applied to it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FB5HpEeEvZ6NjJXl" /></figure><p>Try it yourself using this <a href="https://dartpad.dev/58e5e12bb29370bbca75f19e2685387a">DartPad</a> instance. The example code is as follows:</p><p>Code by Hans Muller</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5356f81dcf3f6d6a87518f3b5003dc06/href">https://medium.com/media/5356f81dcf3f6d6a87518f3b5003dc06/href</a></iframe><h3>Conclusion</h3><p>When implementing a UI that floats widgets on top of other widgets, using the overlay and linking the widgets together is a straightforward and powerful approach. In this article, you learned how to use a LayerLink to glue these widgets together. Now go forth and create your beautiful UI!</p><p><em>To learn more about Jose, visit his pages on </em><a href="https://github.com/JoseAlba"><em>GitHub</em></a><em>, </em><a href="https://www.linkedin.com/in/josealba1996/"><em>LinkedIn</em></a><em>, </em><a href="https://www.youtube.com/channel/UCOdKA_On0oPe1tz02z1QfxA?view_as=subscriber"><em>YouTube</em></a><em>, and </em><a href="https://www.instagram.com/jose.alba/"><em>Instagram</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1d15ca7667b6" width="1" height="1" alt=""><hr><p><a href="https://blog.flutter.dev/how-to-float-an-overlay-widget-over-a-possibly-transformed-ui-widget-1d15ca7667b6">How to float an overlay widget over a (possibly transformed) UI widget</a> was originally published in <a href="https://blog.flutter.dev/">Flutter</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>