background_animated 0.4.0 copy "background_animated: ^0.4.0" to clipboard
background_animated: ^0.4.0 copied to clipboard

a package that provides animations to use in the background or foreground

example/lib/main.dart

import 'package:background_animated/background_animated.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
  runApp(const MainApp());
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Background Animated',
      debugShowCheckedModeBanner: false,
      theme: ThemeData.dark().copyWith(scaffoldBackgroundColor: Colors.black),
      home: HomeScreen(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Column(
        children: [
          Expanded(
            child: ParallaxRain(
              dropColors: [
                ...Colors.primaries,
                ...Colors.accents,
              ],
            ),
          ),
          Expanded(
            child: Starfield(
              colors: [
                ...Colors.primaries,
                ...Colors.accents,
              ],
            ),
          ),
          Expanded(
            child: Fireworks(
              shapeColors: [
                ...Colors.primaries,
                ...Colors.accents,
              ],
              particleColors: [
                ...Colors.primaries,
                ...Colors.accents,
              ],
            ),
          ),
          Expanded(
            child: PerlinNoise(
              colors: [
                ...Colors.primaries,
                ...Colors.accents,
              ],
            ),
          ),
        ],
      ),
    );
  }
}
6
likes
160
points
24
downloads

Publisher

unverified uploader

Weekly Downloads

a package that provides animations to use in the background or foreground

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on background_animated