constellation_particles 0.1.0 copy "constellation_particles: ^0.1.0" to clipboard
constellation_particles: ^0.1.0 copied to clipboard

A mouse-reactive constellation particle field for Flutter with O(n) spatial-grid neighbour lookups and zero runtime dependencies.

example/lib/main.dart

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

void main() => runApp(const _ExampleApp());

class _ExampleApp extends StatelessWidget {
  const _ExampleApp();

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      theme: ThemeData.dark(useMaterial3: true),
      home: Scaffold(
        backgroundColor: const Color(0xFF0A0E14),
        body: Stack(
          children: [
            const Positioned.fill(
              child: ConstellationParticles(
                particleCount: 140,
                color: Color(0xFF64FFDA),
                speed: 1.1,
              ),
            ),
            Center(
              child: Text(
                'move your cursor',
                style: Theme.of(context)
                    .textTheme
                    .titleMedium
                    ?.copyWith(color: Colors.white24, letterSpacing: 2),
              ),
            ),
          ],
        ),
      ),
    );
  }
}
1
likes
160
points
59
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A mouse-reactive constellation particle field for Flutter with O(n) spatial-grid neighbour lookups and zero runtime dependencies.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on constellation_particles