Never miss a beat

Join my newsletter.

Tag: flutter

Flutter's LayoutBuilder Widget

Published: 6/7/2021

Flutter's LayoutBuilder Widget is a widget that allows you to adapt children widgets based off the constraints that the LayoutBuilder is contained in. This allows you to layout widgets differently in different sized containers (like a phone screen vs a tablet screen), but LayoutBuilder also allows you to change how widgets render based off the container that they're rendered within. A good example of the later is rendering a list of items as a list when the container is taller than 500 dp, but…

Reusable SimpleDialog Bodies in Flutter

Published: 1/17/2021

SimpleDialogs are an insanely simple way to display immediately actionable items while conforming to the Material Design specification. They're recommended for use when you need a flexible dialog that doesn't leverage text buttons. Take a moment to familiarize yourself with the Material Spec for SimpleDialogs and once you're back on this tab, we'll dive into their implementation specifically for Flutter. SimpleDialogs in Flutter Alright! Welcome back! SimpleDialogs in Flutter are actually…

How to query flutter dimensions with MediaQuery

Published: 12/24/2020

One of the key selling points for building Flutter applications is the framework's options for building responsive mobile applications. However, it's easy to find yourself overwhelmed by the many options that are available. Often times, you'll want to leverage BoxConstraints, LayoutBuilder, AspectRatio, FittedBox or maybe even the rare FractionallySizedBox. You might even be able to keep things simple by sticking to Flex widgets. However, you'll likely find yourself in a predicament where, for…

Flutter routing inside of the Scaffold

Published: 8/11/2020

If you’re coming from React Native to Flutter, one of the first things you’ll likely ask is “How do I do routing?” First, I’d ask you to consider if you actually need routing. Instead, could you just have a global state that determines which screen to show? In most cases, probably. But if you want things to feel right when building Flutter for Web (or want decent deep linking support), you’ll probably want to build your flutter app with routing. Routing can easily be accomplished via the…