particle_reform 0.0.1 copy "particle_reform: ^0.0.1" to clipboard
particle_reform: ^0.0.1 copied to clipboard

A Flutter package that breaks down any widget into pixel particles and animates them with customizable effects. Watch your widgets scatter, spin, and reform with beautiful particle animations.

example/lib/main.dart

import 'package:example/usecase.dart';
import 'package:flutter/material.dart';
import 'package:particle_reform/particle_reform.dart';

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

class MainApp extends StatefulWidget {
  const MainApp({super.key});

  @override
  State<MainApp> createState() => _MainAppState();
}

class _MainAppState extends State<MainApp> {
  bool useBackground = true;

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        body: GridView.builder(
          gridDelegate: SliverGridDelegateWithMaxCrossAxisExtent(
            maxCrossAxisExtent: 500,
            childAspectRatio: 1.5,
          ),
          itemBuilder: (context, index) {
            var effect = switch (index) {
              0 => Scatter(),
              1 => ScatterDisappear(),
              2 => SpinningCircle(animationSpeed: 0.1, strokeWidth: 30),
              _ => Scatter(),
            };

            var label = switch (index) {
              1 => 'Scatter disappear',
              2 => 'SpinningCircle',
              _ => 'Scatter',
            };

            var item = Usecase(
              effect: effect,
              label: label,
              useBackground: useBackground,
            );
            return item;
          },
          itemCount: 3,
        ),
      ),
    );
  }
}
1
likes
150
points
176
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package that breaks down any widget into pixel particles and animates them with customizable effects. Watch your widgets scatter, spin, and reform with beautiful particle animations.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on particle_reform