fancy_animated_snackbar 0.0.2 copy "fancy_animated_snackbar: ^0.0.2" to clipboard
fancy_animated_snackbar: ^0.0.2 copied to clipboard

fancy_animated_snackbar is a Flutter package for stylish, customizable snackbars with smooth animations. Easily integrate eye-catching snackbars with adjustable icons, colors, and animations into your app.

Fancy Animated Snackbar #

fancy_animated_snackbar is a Flutter package that provides a visually appealing and highly customizable snackbar with smooth animations. This package allows you to display snackbars with various customization options, including background color, icon color, text color, and alignment, with smooth slide and fade transitions.

Features #

  • Smooth Animations: Enjoy smooth slide and fade animations for showing and hiding snackbars.
  • Customizable Appearance: Adjust the background color, icon color, text color, and duration of the snackbar.
  • Flexible Positioning: Position the snackbar at different locations on the screen (e.g., bottom center, top center).
  • Easy Integration: Simple to integrate into your Flutter app with easy-to-configure parameters.

Installation #

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

dependencies:
  fancy_animated_snackbar: ^1.0.0

Usage #

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

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Fancy Animated Snackbar Example'),
        ),
        body: Center(
          child: ElevatedButton(
            onPressed: () {
              fancyAnimatedSnackbar(
                context,
                Icons.notifications,
                'New Notification',
                'You have a new message!',
                Colors.blueAccent,
                alignment: Alignment.bottomCenter,
                snackIconBack: Colors.white,
                snackIconFront: Colors.black,
                snackTextColor: Colors.white,
                duration: Duration(seconds: 5),
              );
            },
            child: Text('Show Snackbar'),
          ),
        ),
      ),
    );
  }
}

Parameters #

  • context: BuildContext - The build context where the snackbar will be displayed.
  • snackIcon: IconData - The icon to display in the snackbar.
  • title: String - The main title text of the snackbar.and opacity change.
  • subTitle: String - The subtitle text of the snackbar.
  • snackBackColor: Color - The background color of the snackbar.
  • alignment: Alignment - The alignment of the snackbar on the screen (default is Alignment.bottomCenter).
  • snackIconBack: Color - The background color of the snack icon (default is Colors.green).
  • snackIconFront: Color - The color of the snack icon (default is Colors.white).
  • snackTextColor: Color - The color of the text in the snackbar (default is Colors.white)
  • duration: Duration - The duration for which the snackbar is visible (default is Duration(seconds: 4)).

Contact #

3
likes
0
points
62
downloads

Publisher

unverified uploader

Weekly Downloads

fancy_animated_snackbar is a Flutter package for stylish, customizable snackbars with smooth animations. Easily integrate eye-catching snackbars with adjustable icons, colors, and animations into your app.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on fancy_animated_snackbar