Creating particles effect with Flutter package
Introduction
If you are developing an application with Flutter and wanting to have particles effect just like this, but you are just too lazy to create it from scratch
then welcome, you are in the right place. There is a new package for this called flutter_particles
and it is already published on Flutter Package Site.
This article will be about this new package and how to use it.
Note: The rendering visual that you are seeing is due to the nature of the .gif and resize method. In real situation the texture is way more better and beautiful. Thank to the talent of Google Software Engineers while developing Flutter, which I did not get any involved in because I am pathetic and my life is a joke. Anyway you get the point, that I am pathetic.
Adding the dependencies
Add this to your package’s pubspec.yaml
file:
dependencies:
blinking_point: any
Usage
For now, this package allows you to specify the number of particles
and the color of particles
that you want.
This will result in:
If you want more control, you will have to dive more into the source codes of the package. However, it would be quite easy since reusable is the key idea of this package. Everything is organized in a way that you can get the components to work as you want even if you are not so into the technical idea.
You can change the properties of the particles. This will requires you to import the Particle()
class (with no ‘s’) so you can control the overall speed of all the particles and how far it is between two particles for a line to be drawn.
Be careful that you gonna mess up the the whole things with ridiculous effects. For example, the above customization will result in this.
But then, who I am to judge when it’s me who allows this madness to happen.
Issues and Pull requests
Please visit the repository for issues or pull requests. All contribution are welcomed.
Also, please just open a new issues if you want to request for new features. Such as tapping the screen and I will appear with a unicorn costume to amuse you or adding method that print out my face and floating it around, laughing desperately, etc.