Getting Started

Random the stars

Random position of the stars

To make stars random position in the screen, we make a class Star and measure the width and height screen to limit the position (so all stars will are bounded inside the screen).

How to random stars and render it

2. Create animation and manage its order by the controller

In flutter, a animation is present by Animation class and these objects are managed by AnimationController.

Example:

Make multiple animation and manage it

A CurvedAnimation with Interval help to set when animation will start and when will end during the controller running. The controller can play multiple animations with flexible time.

3. Handling hero animation

Flying an image from one screen to another is called a hero animation in Flutter

A hero animation

To do this, we use Hero widget and just notice about the tag attribute have to set the same value in current screen and next screen.

Hero widget in current screen and next screen

4. Circular rotation planet and sattelite

A planet rotate with satellite sourround

With satellite, we make an RadialSeekBarPainter class to deal with it

With tab indicator, we add and LinearGradient to handle the color