Photo by Tory Bishop on Unsplash

As a Flutter developer I’m sure you heard about this popular sentence: “Everything’s a Widget” at least once in your dev life. It’s kind of the Flutter’s catch phrase and it reveals the inner force of this extraordinarily good SDK!

When we dive in the Widget catalog, we can see a lot of small widgets doing only one job such as Padding, Align, SizedBox, and so on. We create other widgets by composing them and I find this approach scalable, powerful and easy to understand.

But when I read some source code I find on the Internet or written by…


Photo by Anne Nygård on Unsplash

In a previous blog post I introduced Maestro which is for now an experiment to manage you app state in a Flutter application.
Today I will show you how to use the power of Freezed ⚡️ to create the models and the states. I will not explain in details how this library works but I will show you how easily we can create immutable objects with it!

Freezed is a great library created by Remi Rousselet for generating all the boilerplate code you want for immutable objects and even more!

The source code of today is heavily inspired by an…


Photo by Dayne Topkin on Unsplash

We already have a huge bunch of options for managing our app state in Flutter, so you could wonder why spend some time on another one?
The reason is simple: I love creating things, I can’t stop. Sometimes I find myself thinking about what I could make when I rock my daughter to sleep. Sometimes it can be useful, other times it’s not but I still have learned something in the end.
Today I want to tell you the story of Maestro and you will decide whether it can help you or not. …


Photo by Alex Radelich on Unsplash

I love how Flutter is designed. The combination of immutables objects, the Widgets and mutables ones called RenderObjects is very powerful although not super intuitive for beginners.

We can do a lot just by composing widgets with StatelessWidgets and StatefulWidgets, but we cannot do everything, or not in an efficient way. That’s why you need to understand how to create your own RenderObject when it’s necessary.
In this post I will not explain what is the difference between a Widget and a RenderObject but I will show you how I created a simple RenderObject in order for you to do the…


Every Hero needs a Sidekick

Animations can turn a great app into an astounding and unforgettable one. They are a big part of the user experience and without them, an application doesn’t really look attractive.

Thanks to Flutter, it’s easier than ever to animate the UI of your app in order to reinforce the user’s action.
For example, it’s pretty straightforward to create a transition between two screens by animating a common element with the Hero widget:


It’s a kind of magic ✨

Dart mixer (modified from shareicon)

When I started to learn Dart, the concept of mixins was new for me.
I come from the C# world, where it does not exist (at least prior to C# 8.0, to the best of my knowledge).
At first, I found this concept somewhat difficult to understand, until I realized how powerful it was.

Disclaimer: Mixins specifications are evolving in Dart 2. Some of the following content might not be applicable at the time of reading this.

🤔 Why do we need mixins?

If languages such as C# do not have mixins, it probably isn’t that useful, is it?

Let’s have a look at the following…


Dependency injection for Dart and Flutter

Today, I’m very pleased to announce kiwi, a dependency injection library for Dart and Flutter which aims to be simple and fast.

Why?

Even if I’m writing a small application, I tend to separate the logic from the UI. Because projects grow, I think it’s a good practice to do this if the project is not a proof of concept.

I like to have small services with one responsibility. It’s easier to test, to maintain, to read, to understand. A problem with this principle is that you end up with services having a lot of dependencies. Creating such a service can…


In a previous article, I explained how I reproduced the iOS sliding row animation in Flutter, through my Slidable widget. In that article I used some animations to illustrate my words and today I’m going to show you how I created them.

📐 The tools

I first looked for animations tools, but I didn’t want anything complicated, nor invest money and time for such simple animations. So I thought “Why do not just use Flutter?”
I tried something and it was really easy to create the animations I wanted, so I entirely coded my animations in Dart using Flutter 😄, isn’t it beautiful…


Deep dive on the SlidableDrawerDelegate

In a previous article, I explained how I created the Slidable widget. Today we’re going to dissect an essential component of it: the SlidableDrawerDelegate.

🤔 What is it?

In the Slidable widget, the developer can choose how the slide actions animate through what I named SlidableDelegates. The SlidableDrawerDelegate is one of the built-in ones:


Synopsis

This is the story behind the creation of the Slidable widget (available here). A widget that let you add contextual actions on your list items when you are sliding it to the left or to the right.

How everything started

I’m a passionate developer. This is what I do for living, but it’s mostly my main hobby ❤️. Some express themselves through words, drawings, music, I express myself through code. I’m more comfortable with variables and functions than with a ball or a racket. This is who I am.

We are in July 2018. It’s sunny ☀️ and kinda hot here in Brittany…

Romain Rastel

Flutter addict

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