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

A wunderful package for creating customizable confetti animations using image and SVG assets, with support for color overlays and dynamic particle effects.

example/lib/main.dart

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

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

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

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Confetti Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.blueGrey),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'Confetti Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            TextButton(
              onPressed: () {
                WunderFlutterConfetti.startConfettiWithSvgAsset(
                    context, 'assets/ufo.svg', colors: [
                  Colors.red,
                  Colors.blue,
                  Colors.green,
                  Colors.orange,
                  Colors.yellow
                ]);
              },
              child: const Text(
                'Confetti with SVG',
              ),
            ),
            TextButton(
              onPressed: () {
                WunderFlutterConfetti.startConfettiWithImageAsset(
                    context, 'assets/ufo.png', colors: [
                  Colors.red,
                  Colors.blue,
                  Colors.green,
                  Colors.orange,
                  Colors.yellow
                ]);
              },
              child: const Text(
                'Confetti with PNG',
              ),
            )
          ],
        ),
      ),
    );
  }
}
3
likes
0
points
43
downloads

Publisher

verified publisherwunderbytes.eu

Weekly Downloads

A wunderful package for creating customizable confetti animations using image and SVG assets, with support for color overlays and dynamic particle effects.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, flutter_confetti, flutter_svg

More

Packages that depend on wndr_flutter_confetti