Flutter – Drawing images with the CustomPainter

The CustomPainterer provides a method to draw an image on the canvas. First, however, you must know how to load your images from your assets and offer them to your CustomPainter. Luckily, when you know how to do this, this is not hard! Let’s quickly get started. The first step is to add the image to your assets. You have to define this asset in the pubspec.yaml. Now you can access the image in your Flutter Application. However, most examples…

Read More

Flutter – Using Google Cloud Functions with parameters

In the previous blog post, I describe how to call a Google Cloud Function without Firebase. However, the only option was to invoke the function. Most of the time, more complex functions are necessary. This blog post will describe how to pass information to your Google Cloud Function. This can be done in multiple ways. Creating the Google Cloud Function First, let’s update the Google Cloud Function. This function should handle the variables. There are two easy ways to take…

Read More

Flutter – Calling a Google Cloud Function

Most examples of calling a cloud function are using Firebase. With Firebase, it is easy to write and maintain your cloud functions. Especially if you are using other functionalities that Firebase offers. However, there is a limitation on the languages you can use to write your cloud functions. With Firebase, it is only possible to write your functions in Javascript or Typescript. Luckily it is not that hard to call the cloud functions directly. Creating the Google Cloud Function For…

Read More

Toggling the flash modus on a Flutter camera

In the last blog post, I show how to take a picture in Flutter using the camera package. In this blog post, I will dive deeper into the camera by explaining how to turn the flash modus on and off! I will start this example with the result of the previous blog post. In that blog post, I describe all steps necessary to show the camera’s preview and take a picture. One of the steps is to initialize the controller…

Read More

Switching camera’s in Flutter

In the last blog post, I show how to take a picture in Flutter using the camera package. In this blog post, I will dive deeper into the camera by explaining how to switch between the different cameras on the phone. I will start this example with the result of the previous blog post. In that blog post, I describe all steps necessary to show the camera’s preview and take a picture. One of the steps is to initialize the…

Read More

Taking pictures with Flutter

In this blog post, I will show you how to use the camera package to take a picture in Flutter. Furthermore, I will provide an example of how to deal with the result file. In this example, I will open another page to display the picture. Please note that even though most of the features of the camera package are working, the plugin is still under development and some of the APIs might change. Setup the project Before we can…

Read More

Update Flutter Animations with different values

In this blog post I will show you how to animate your Widgets with different values. In this blog post, I show you how to animate you CustomPaint Widgets in Flutter. However, in this animations the start and end value of the animation are fixed. The animation value always go from zero to hundred. You can use this approach to compute the next value based on the percentage you are through with the animation. But you can also update the…

Read More

Drawing and rotating arcs in Flutter

In this blog post, I will show you how to draw arcs. Furthermore, I will explain how to detect the drag and drop in the Widget to rotate the arcs. There are some packages in Flutter to help you draw arcs and donut graphs. However, if you want to interact with those charts, you will probably have to implement something yourself. Luckily, with the CustomPainter, this is not difficult at all. Before you start reading, I will show you what…

Read More

Cat and Mice – Part 7: Releasing the App

In this blog series about Cat and Mice, I will discuss the whole process, from design to implementation, from publishing to artificial intelligence. Cat and Mice is a game that is played on a checkers board. One player plays the cat and has only one piece. The piece of this player starts at one side of the checker’s board. On the other side are four pieces of the mice. The goal for the cat is to reach the other side…

Read More

Cat and Mice – Part 6: Adding sound

In this blog series about Cat and Mice, I will discuss the whole process, from design to implementation, from publishing to artificial intelligence. Cat and Mice is a game that is played on a checkers board. One player plays the cat and has only one piece. The piece of this player starts at one side of the checker’s board. On the other side are four pieces of the mice. The goal for the cat is to reach the other side…

Read More