floating_dots 0.2.4 copy "floating_dots: ^0.2.4" to clipboard
floating_dots: ^0.2.4 copied to clipboard

Creates a group of floating dots (or a single floating dot) that travel at a random speed from one edge of the screen to another.

floating_dots #

Pub

Creates a group of coloured floating dots (or a single floating dot) that travel at a random speed from one edge of the screen to another.

small dots, floating randomly small dots, floating up

Installation #

In your pubspec.yaml root add:

dependencies:
    floating_dots: ^0.2.2

then,

import 'package:floating_dots/floating_dots.dart';

Usage #

FloatingDotGroup #

FloatingDotGroup(
    number: int,
    direction: Direction,
    trajectory: Trajectory,
    size: DotSize,
    colors: List<Color>,
    opacity: double,
    speed: DotSpeed,
)

FloatingDot #

FloatingDot(
    direction: Direction,
    trajectory: Trajectory,
    radius: double,
    color: Colour,
    opacity: double,
    time: int,
)

Examples #

small dots

Small dots

FloatingDotGroup(
    number: 5,
    direction: Direction.up,
    trajectory: Trajectory.random,
    size: DotSize.small,
    colors: Colors.primaries,
    opacity: 1,
    speed: DotSpeed.fast,
),

medium dots

Medium dots

FloatingDotGroup(
    number: 25,
    direction: Direction.random,
    trajectory: Trajectory.random,
    size: DotSize.medium,
    colors: Colors.accents,
    opacity: .5,
    speed: DotSpeed.medium,
),

large dots

Large dots

Stack(
    children: <Widget>[
        Container(
            width: double.infinity,
            height: double.infinity,
            color: Colors.black,
        ),
        FloatingDotGroup(
            number: 1,
            direction: Direction.up,
            trajectory: Trajectory.straight,
            size: DotSize.large,
            colors: [Colors.deepOrange],
            opacity: 1,
            speed: DotSpeed.medium,
        ),
    ],
),
16
likes
40
pub points
66%
popularity

Publisher

unverified uploader

Creates a group of floating dots (or a single floating dot) that travel at a random speed from one edge of the screen to another.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on floating_dots