Skip to content

A Flutter package project that Allows you to create very beautiful live animations in the background (like randomly moving icons ,circles ,rectanfles ....) within 10 lines.

License

Notifications You must be signed in to change notification settings

aruhant/vitality

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vitality

  • Introducing a powerful Flutter package that lets you effortlessly create stunning live animations in the background. With just 10 lines of code, you can add randomly moving icons, circles, rectangles, and more to your app, resulting in a visually captivating experience.

Examples

Here is some examples of using vitality library :

  • example 1 example 2

  • example 3 example 4

  • example 5

usage :

  • The vitality package is incredibly user-friendly, making it a breeze to incorporate into your code. Take a look at the example below to quickly grasp how to use it:
Vitality.randomly(
                background: Colors.black,
                maxOpacity: 0.8,
                minOpacity: 0.3,
                itemsCount: 80,
                enableXMovements: false,
                whenOutOfScreenMode: WhenOutOfScreenMode.Teleport,
                maxSpeed: 1.5,
                maxSize: 30,
                minSpeed: 0.5,
                randomItemsColors: [Colors.yellowAccent, Colors.white],
                randomItemsBehaviours: [
                  ItemBehaviour(shape: ShapeType.Icon, icon: Icons.star),
                  ItemBehaviour(shape: ShapeType.Icon, icon: Icons.star_border),
                  ItemBehaviour(shape: ShapeType.StrokeCircle),
                ],
              )
  • The "whenOutOfScreenMode" parameter determines how a shape behaves at the screen edge :

    • none : It does nothing and continues its movements out the screen.
    • Reflect : It bounces and returns in the oppisite direction.
    • Teleport : It continues its movements to the other side of the screen.
  • The "randomItemsBehaviours" parameter determines the shapes that the library can generate and defines the available options for generating shapes :

    • You can choose one from the ShapeType enum (FilledCircle, StrokeCicle, FilledRectangle, Icon, ...)

      ItemBehaviour(shape: ShapeType.StrokeCircle)
    • if you chose the icon type you also have to pass an IconData to the Item Behaviour

       ItemBehaviour(shape: ShapeType.Icon, icon: Icons.star)

About

A Flutter package project that Allows you to create very beautiful live animations in the background (like randomly moving icons ,circles ,rectanfles ....) within 10 lines.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 100.0%