Sign in

Flutter Enthusiast, Mobile developer @Be

You can find explanations for Element and RenderObject in a lot of places. But it is these type of articles that make me really "get" them. Great work!


As you may know, one of the most important things to understand when developing your UI in Flutter is this sentence:

Constraints go down. Sizes go up. Parent sets position.

If you haven’t, I suggest you read this article before continuing.

And as always, I came a little late to the party and only learned about this a year into my Flutter career.

In some scenarios though, maybe it’s worth diving a little deeper.

Consider this conversation between a parent Widget and its child:

Child: Mom, Dad, how big should I be?

Parent: Hey buddy, you just need to be…

Let’s go on an adventure today.

Our quest is to implement a header with custom snapping behavior.

Something like this:

Getting Started

You can follow the article with the completed code here.

Since ListView doesn’t support scroll effects. To CustomScrollView we go!

First, we should check if there is any prebuilt way to do this.

SliverAppBar looks promising. It even has the snap property!

  • We give the SliverAppBar an expandedHeight which will allow the flexibleSpace widget to expand and collapse within the SliverAppBar.
  • We turn on the pinned and stretch effects.
  • We add an infinite load SliverList.
  • The status bar…

With Flutter Web entering beta, our dream of one single code base is getting closer and closer. So I decided to try it out.

I created a portfolio page that looks like this.


In Flutter, hiding a widget is very easy.

Let’s say you want to hide MyWidget in this layout when condition is false

MyWidget is in a Column
MyWidget is a child of Column

All you have to do is:

However, things get a little more complicated when you notice that if MyWidget is a StatefulWidget, it’s State will be recreated each time MyWidget is shown. Or the fact that MyWidget size would shrink to 0 and crumble your layouts. What should you do if you want to get MyWidget size to do some calculation while it is hidden?

Let’s look at some widgets that handle…

Like most programmers in third-world countries, my first choice of OS has always been Windows. And as far as developing Android goes, the experience is, at the very least, tolerable, except one thing: Font Rendering.

Window’s font rendering, comparing to it’s macOS counterpart, is horrendous no matter how many hours you spent staring at those 6 sample texts to configure ClearType.

Font comparison Windows vs macOS by u/gutigen

For normal users maybe it’s not a big deal, but when most of your job is to look at texts…

Here’s where MacType comes in. Download it here.

A better font rasterizer for Windows

Lê Dân

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store