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.

example/example.dart

import 'package:floating_dots/floating_dots.dart';
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Dots Demo',
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatelessWidget {
  MyHomePage({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Container(
        child: FloatingDotGroup(
          number: 500,
          direction: Direction.up,
          trajectory: Trajectory.straight,
          size: DotSize.small,
          colors: [
            Colors.red,
            Colors.green,
            Colors.blue,
            Colors.yellow,
            Colors.purple,
            Colors.orange
          ],
          opacity: 0.5,
          speed: DotSpeed.slow,
        ),
      ),
    );
  }
}
16
likes
40
pub points
68%
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