floating_dots

Last updated:

0 purchases

floating_dots Image
floating_dots Images
Add to Cart

Description:

floating dots

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.2.2
copied to clipboard
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,
)
copied to clipboard
FloatingDot #
FloatingDot(
direction: Direction,
trajectory: Trajectory,
radius: double,
color: Colour,
opacity: double,
time: int,
)
copied to clipboard
Examples #

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

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

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,
),
],
),
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.