Grant Skinner

The "g" in gskinner. Also the "skinner".

@gskinner

XD to Flutter v4: Better Layout Code

v4.0 of the “XD to Flutter” plugin is available now, with a focus on simplifying and improving the Dart code it generates.

Building on v3’s focus on improving the developer experience, v4 includes a fairly significant refactor of how layout code is generated by the plugin to enable smarter, cleaner results.

Continue reading →

Flutter: Introducing `url_router` – A simpler Router controller.

When it comes to implementing a url-based Router (aka Nav2) there are really 2 high-level components to the API:

  • A controller to read/write to the current url
  • A parsing/matching system to convert a url into a stack of views, or pages.

The interesting thing here, is that the controller portion, is a fairly stable, boring API. Reading or writing the url location, or accessing queryParams is all pretty straight-forward. Really all you are doing here is setting a string value, and parsing query params using the URI class.

Continue reading →

Flutter: Introducing `RoutedWidgetSwitcher`

We’ve recently released a new package for use with all “Nav 2” implementations, called routed_widget_switcher: https://pub.dev/packages/routed_widget_switcher

It allows you to declaratively switch child widgets based on the current Router location:

class SideBar extends StatelessWidget {
    Widget build(_){
     return RoutedSwitcher(
        builders: (info) => [
            Routed('*', MainMenu.new),
            Routed('/dashboard', DashboardMenu.new),
            Routed('/settings', SettingsMenu.new),
        ]);
    }
}
Continue reading →

Flutter: Adding (scalable) state management to the new `skeleton` template

Recently we took a deep dive into the new skeleton template included in the Flutter SDK. As noted in the article, one of the big missing pieces in the template is a scalable state management solution with dependency injection and data-binding.

Given that, we thought it would be informative to convert it to use a couple of popular state management libraries, specifically riverpod and GetItMixin.

Continue reading →