floating_dots 0.2.0 floating_dots: ^0.2.0 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 #
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.
Installation #
In your pubspec.yaml
root add:
dependencies:
floating_dots: ^0.1.1
then,
import 'package:floating_dots/floating_dots.dart';
Usage #
FloatingDotGroup #
FloatingDotGroup(
number: int,
direction: Direction,
trajectory: Trajectory,
size: DotSize,
colors: List<Color>,
)
FloatingDot #
FloatingDot(
direction: Direction,
trajectory: Trajectory,
radius: double,
color: Colour,
)
Examples #
Small dots
FloatingDotGroup(
number: 5,
direction: Direction.up,
trajectory: Trajectory.straight,
size: DotSize.small,
colors: Colors.primaries,
)
Medium dots
FloatingDotGroup(
number: 25,
direction: Direction.random,
trajectory: Trajectory.random,
size: DotSize.medium,
colors: Colors.accents,
)
Large dots
FloatingDotGroup(
number: 3,
direction: Direction.up,
trajectory: Trajectory.straight,
size: DotSize.large,
colors: Colors.accents,
)