Flutter Animation Package

This Flutter package provides a collection of 20 custom animations that can be used in business applications. The package includes various animation effects such as zoom, slide, fade, scale, and more. These animations are easy to integrate and customize, making them perfect for improving the user interface of your Flutter apps.

Features

  • 20 pre-built animations including:

    • FadeTransitionWidget: Fades the widget in and out.
    • ScaleAndTranslate: Combines scaling and translating.
    • SlideInFromTop: Slide-in animation from the top.
    • SlideInFromBottom: Slide-in animation from the bottom.
    • ZoomEffect: Scales up the widget smoothly.
    • BounceEffect: Bounce animation for widgets.
    • SlidePageTransition: Page slide transitions.
    • ElasticEffect: Stretch animation with an elastic feel.
    • AnimatedSnackbar: Custom animated snackbar with sliding and fade effects.
    • RotationEffect: Rotation effect for widgets.
    • FlipTransition: A flip animation for widgets.
    • ExpandAndCollapse: Expand or collapse an element.
    • DiagonalBounce: Diagonal bounce animation.
    • And more...
  • Easy-to-use widget-based API.

  • Customizable durations and animation curves.

  • Optimized for interactive UI/UX designs.

Installation

To install this package, follow these steps:

  1. Add the following to your pubspec.yaml file:
dependencies:
  flutter:
    sdk: flutter
  flutter_animation_package: ^1.0.0
import 'package:flutter/material.dart';
import 'package:flutter_animation_package/flutter_animation_package.dart'; // Import the package

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: Text("Flutter Animation Examples")),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              // ZoomEffect
              ZoomEffect(
                duration: Duration(seconds: 1),
                child: Container(
                  width: 100,
                  height: 100,
                  color: Colors.blue,
                ),
              ),
              SizedBox(height: 20),
              // SlideInFromTop
              SlideInFromTop(
                child: Container(
                  width: 100,
                  height: 100,
                  color: Colors.green,
                ),
              ),
              SizedBox(height: 20),
              // FadeTransitionWidget
              FadeTransitionWidget(
                duration: Duration(seconds: 2),
                child: Container(
                  width: 100,
                  height: 100,
                  color: Colors.red,
                ),
              ),
              SizedBox(height: 20),
              // BounceEffect
              BounceEffect(
                duration: Duration(seconds: 1),
                child: Container(
                  width: 100,
                  height: 100,
                  color: Colors.purple,
                ),
              ),
              SizedBox(height: 20),
              // SlidePageTransition
              SlidePageTransition(
                duration: Duration(seconds: 1),
                child: Container(
                  width: 100,
                  height: 100,
                  color: Colors.orange,
                ),
              ),
              SizedBox(height: 20),
              // ElasticEffect
              ElasticEffect(
                duration: Duration(seconds: 1),
                child: Container(
                  width: 100,
                  height: 100,
                  color: Colors.yellow,
                ),
              ),
              SizedBox(height: 20),
              // AnimatedSnackbar Example
              ElevatedButton(
                onPressed: () {
                  final snackBar = AnimatedSnackbar(
                    message: 'This is an animated snackbar!',
                  );
                  ScaffoldMessenger.of(context).showSnackBar(snackBar);
                },
                child: Text('Show Snackbar'),
              ),
            ],
          ),
        ),
      ),
    );
  }
}

---

This version of the `README.md` file includes the **example usage code** directly inside the markdown content. It shows how to integrate and use the animations within a simple Flutter app.

Let me know if you need further adjustments!