Flutter Drag and Drop – State Management

We have showed how to implement a simple drag and drop application in Flutter. However the state management in the blog post was very simplistic and probably only useful for the most basic use cases. Of course, you can still learn about drag and drop and integrate it with your own state management solution. In this blog post, we will show how to integrate the drag and drop with the Riverpod state management solution. However, there are more excellent state…

Read More

Flutter GetX Example – Category Selection

In the latest blog posts, I wrote about Flutter Hooks, Provider, and Riverpod to simplify state management in Flutter. We described how to streamline an interactive category selection application. The user can select categories in one Widget and access those categories in another Widget. With the state management solutions, this is a lot easier to reason about, write and maintain the code. There are multiple solutions, such as GetX and Riverpod, which have different approaches. In this blog post, we…

Read More

Creating a Cat Voting App with Flutter

Recently, I discovered The Cat API. This API returns an image of a cat on which we can vote. Their front page shows a great example. As an owner of two adorable cats, I immediately knew that I had to create a simple app for this. Luckily with Flutter, this is a pretty simple thing to build! So what are we going to develop? First, we will display an image of a cat. Then, the user can swipe it to…

Read More

About those unfinished side projects

If you are anything like me, you love to start a lot of side projects. As a software developer, it is easy to start with a lot of different projects. If you know how to program, your options for side projects are infinite. However, if you are even more like me, you left most of those projects on a graveyard. With COVID-19 around, the chance is that you have more time due to less travelling, no social meetings, no sports.…

Read More

Lessons learned from publishing my first app

Last year I published my first app on the Google Play Store. The road there was bumpy, starting many years ago to publish a simple game. It took multiple breaks and restarts. Most of them because I thought too simple about some of the basic parts during app development. However, I also learned a lot from it and will probably not make the same mistakes again. I will discuss some of the pitfalls I fell into. Dealing with different screen…

Read More

Flutter Riverpod Future Provider – Example

Aysynchronous operations are in almost every application that works with a backend. Whether it is GraphQL, Rest or anything else, you have the same pattern. You start the request, you wait till it is done and then show the data. In Flutter, Riverpod provides the FutureProvider. By using FutureProvider, the UI will be able to read the state of the future synchronously, handle the loading/error states, and rebuild when the future completes. Setup the Project Before we can start with coding,…

Read More

Flutter Riverpod Testing – Example

Testing your Widget is important during Application Development. When it grows more complex, it becomes more work to manually test everything. Having tests for your widgets makes sure that the Widgets behave as we expect them to. This saves time when developing new features. In the last blog post, we already showed how to do this with Flutter Hooks. In this blog post we are testing our Flutter Riverpod example. Setup the project Before we can start with coding, we…

Read More

Flutter Hooks – Testing Your Widgets

Testing your Widget is important during Application Development. When it grows more complex, it becomes more work to manually test everything. Having tests for your widgets makes sure that the Widgets behave as we expect them to. This saves time when developing new features. This way, you do not have to test all other features again. In this blog post, we are going to describe how to create tests for your Widgets that contain Flutter Hooks. Setup the project Before…

Read More

Riverpod State Management Example – Tic Tac Toe

We are going to show another example of Riverpod. This time we will create Tic Tac Toe. As shown earlier, we can easily create Tic Tac Toe with animation in Flutter. However, the state management was all over the place. In this blog post, we will show a better way to manage the state with Riverpod. Secondly, we are going to show another example of Flutter Freezed. Immutables can greatly help with reducing errors in your code and it works…

Read More

Flutter Freezed – Working with Immutable’s

There are times when immutable objects can make your life a lot simpler. Freezed is here to simplify working with immutable’s in Flutter. As they say: yet another code generator for unions They promise simple syntax without compromising the number of features. Before we start let’s take a quick look at what exactly is an immutable object. An object whose state cannot be changed after construction But why would you want to work with immutable’s? This is a question…

Read More