There will be times that a colored icon won't be enough for the UI that you are building in Flutter. How about if we put a gradient color on the icon instead? The problem is that there is no gradient method on the Icon widget. So we need to use a ShaderMask widget and wrap around the Icon. Here's an example implementation and called it GradientIconWidget: In order to use this, all you need to do is to pass the icon and gradient that you would like to apply:
Blog
Git tips: How to Ignore changes to a tracked file
There will be times when you have a file that you would need to edit to test something in your app and you don't want to commit those changes to the repository. Let’s say you have config_dev.dart currently containing settings of your app in a development environment: const String apiUrl = “localhost:3000/api/articles/“ const bool debugMode = false; Now, for example, you would need to change the URL of the API to point to another local machine or test server within your network.
OOP in Dart - DBZ Edition
The following slideshow was part of my talk last February 2020 which gives a fun look at object-oriented programming in Dart. I used familiar anime characters to make it easy enough for beginners to understand and to be clear enough to illustrate objects in Dart language. Slide 1 Imagine you were given the task of creating an RPG set in the Dragonball universe and your task was to develop the Saiyan characters of the game.
Hello World
When we start to learn programming we always use the example of printing “Hello World” in the screen or console. It is a good start for most as it teaches us the basics of how a simple program would work. The text or greeting that we use is also somewhat significant as if our tiny creation is greeting the world and at the same time announcing, hey I am the start of a wonderful adventure for my creator, that there is potential for greatness if this action is continued and improved upon.