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

A fully customizable Flutter widget that adds sparkling or animated shapes such as stars, circles, or snowflakes to any widget. Great for festive UIs, celebration screens, birthdays, holidays, special [...]

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.circle,
                child: Container(
                  width: 200,
                  height: 200,
                  alignment: Alignment.center,
                  decoration: BoxDecoration(
                    color: Colors.redAccent,
                    borderRadius: BorderRadius.circular(10),
                  ),
                  child: const Text(
                    "Circle",
                    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

A fully customizable Flutter widget that adds sparkling or animated shapes such as stars, circles, or snowflakes to any widget. Great for festive UIs, celebration screens, birthdays, holidays, special events, or decorative effects. Designed to be lightweight, smooth, and highly performant. Easily integrate dynamic, beautiful animated elements into your app without heavy performance costs. Perfect for enhancing user interfaces with interactive, lively, and eye-catching visual animations.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on random_shapes_animator