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

Allows developers to create animated backgrounds for their Flutter apps.

example/lib/main.dart

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: DynamicBg(
          duration: const Duration(seconds: 45),
          // painterData: PrebuiltPainters.chocolate, // Try a prebuilt painter
          painterData: ScrollerPainterData(
            direction: ScrollDirection.left2Right,
            shape: ScrollerShape.circles,
            backgroundColor: ColorSchemes.gentlePurpleBg,
            color: ColorSchemes.gentlePurpleFg,
            shapeWidth: 24.0,
            spaceBetweenShapes: 24.0,
            fadeEdges: true,
            shapeOffset: ScrollerShapeOffset.shiftAndMesh,
          ),
          child: Center(
            child: Row(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                const SizedBox(width: 25),
                Expanded(child: Image.asset('assets/images/logo.png')),
                const SizedBox(width: 25),
              ],
            ),
          ),
        ),
      ),
    );
  }
}
42
likes
150
points
86
downloads

Publisher

verified publisherhexcat.dev

Weekly Downloads

Allows developers to create animated backgrounds for their Flutter apps.

Topics

#animated-background #live-background

Documentation

API reference

License

MIT (license)

Dependencies

collection, flutter

More

Packages that depend on dynamic_background