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

A Flutter package that provides staggered animations for widgets.

Staggered Animated Widget #

A Flutter package that provides staggered animations for widgets.

Features #

  • Provides a simple way to add staggered animations to your Flutter widgets.
  • Supports multiple animation directions: from top, bottom, left, or right.
  • Easy to use with customizable delay.

Getting Started #

To use this package, add it to your pubspec.yaml file:

dependencies:
  staggered_animated_widget: ^1.0.0 

Usage #

Here’s a simple example of how to use the StaggeredAnimatedWidget:

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

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('Staggered Animated Widget Example'),
        ),
        body: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            StaggeredAnimatedWidget(
              delay: 200, // Delay in milliseconds
              direction: AnimationDirection.fromBottom, // Animation direction
              child: Container(
                width: 100,
                height: 100,
                color: Colors.blue,
              ),
            ),
            SizedBox(height: 20),
            StaggeredAnimatedWidget(
              delay: 400,
              direction: AnimationDirection.fromRight,
              child: Container(
                width: 100,
                height: 100,
                color: Colors.red,
              ),
            ),
          ],
        ),
      ),
    );
  }
}

Parameters #

  • child: The widget to animate.
  • delay: The delay before the animation starts (in milliseconds).
  • direction: The direction from which the widget will enter. Can be one of the following:
    • AnimationDirection.fromTop
    • AnimationDirection.fromBottom
    • AnimationDirection.fromLeft
    • AnimationDirection.fromRight

Additional Information #

For more complex animations, you can customize the duration and curve properties inside the StaggeredAnimatedWidget. For detailed usage, consider adding more examples to the /example folder of your package.

License #

This package is licensed under the MIT License.

1
likes
0
points
31
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package that provides staggered animations for widgets.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on staggered_animated_widget