random_shapes_animator 1.1.0 copy "random_shapes_animator: ^1.1.0" to clipboard
random_shapes_animator: ^1.1.0 copied to clipboard

Lightweight Flutter widget for adding sparkling, animated shapes like stars or snowflakes with random motion to any UI.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:random_shapes_animator_example/random_shape.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(theme: ThemeData.dark(), home: const SparkleDemoPage());
  }
}

class SparkleDemoPage extends StatelessWidget {
  const SparkleDemoPage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Padding(
          padding: const EdgeInsets.all(20.0),
          child: Row(
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
            children: [
              RandomShapesAnimator(
                maxSpeed: 1.5,
                shape: Shape.spiral,
                child: Container(
                  width: 200,
                  height: 200,
                  alignment: Alignment.center,
                  decoration: BoxDecoration(
                    color: Colors.redAccent,
                    borderRadius: BorderRadius.circular(10),
                  ),
                  child: const Text(
                    "Spiral",
                    style: TextStyle(fontSize: 24, color: Colors.white),
                  ),
                ),
              ),
              RandomShapesAnimator(
                maxSpeed: 1.5,
                shape: Shape.star,
                areaSize: const Size(200, 250),
                child: Container(
                  width: 200,
                  height: 200,
                  alignment: Alignment.center,
                  decoration: BoxDecoration(
                    color: Colors.orange,
                    borderRadius: BorderRadius.circular(10),
                  ),
                  child: const Text(
                    "Star",
                    style: TextStyle(fontSize: 24, color: Colors.white),
                  ),
                ),
              ),
              RandomShapesAnimator(
                maxSpeed: 1.5,
                shape: Shape.snowflake,
                areaSize: const Size(200, 250),
                child: Container(
                  width: 200,
                  height: 200,
                  alignment: Alignment.center,
                  decoration: BoxDecoration(
                    color: Colors.blueAccent,
                    borderRadius: BorderRadius.circular(10),
                  ),
                  child: const Text(
                    "Snowflake",
                    style: TextStyle(fontSize: 24, color: Colors.white),
                  ),
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
4
likes
0
points
46
downloads

Publisher

unverified uploader

Weekly Downloads

Lightweight Flutter widget for adding sparkling, animated shapes like stars or snowflakes with random motion to any UI.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on random_shapes_animator